如何在金字塔框架中添加启动会话?

时间:2018-04-26 07:03:51

标签: python python-3.x pyramid deform

我是金字塔框架的初学者。我尝试在应用程序中启动会话但会话无法工作。以下是以下代码: init.py

cols <- c('cyan2','red','orange','green','dodgerblue2')

pdf('~/Downloads/donuts.pdf', width = 10, height = 10, bg = "snow")
par(omi = c(0.5,0.5,0.75,0.5), mai = c(0.1,0.1,0.1,0.1), las = 1)
print(piedonut(data = browsers, cols = cols, force = 80, nudge_x = 3, nudge_y = 10))
dev.off()

views.py

from pyramid.config import Configurator    
from pyramid.session import SignedCookieSessionFactory
def main(global_config, **settings):
    my_session_factory = SignedCookieSessionFactory('itsaseekreet')
    config = Configurator(settings=settings)     
    config.set_session_factory(my_session_factory)
    config.add_route('next', '/next')

我得到了TypeError:&#39; CookieSession&#39;对象不可调用

0 个答案:

没有答案