python - Pyramid Auth error with Persona / Browserid -
I want to pyramid in my app with personality or browser id, the problem is that using both of us An error
The console let me drops when I use personality:
import error: no module name pyramid_svador and when I
My visited file Import pyramid.security from pyramid authenticated_userid #from waitress import from pyramid.response Import response from .config import configurator pyramid.security import authenticated_userid to pyramid.response import r Spirits from pyramid.config import configurators serve deferred import from pyramid.exceptions. Hello_world (request): userid = authenticated_userid (request) if userid is none: increase () return feedback ('hello% s!'% (Userid Importing import import from the import importer root import from imported import from pyramid.config to my INIT file Make pyramid_jinja2 import OS here = os.path.dirname (os.path.abspath (__ file__)) settings = {'persona.secret': 'some secret', 'personality' : // localhost: 8080 '} settings [' mako.directories'] = os.path.join (here, 'templates') __here__ = os.path.dirname (os.path.abspath (__ file__)) def make_app ( ): "" "This function gives a pyramid WSGI application" settings "{} settings ['mako.directories'] = os.path.join (__ here__, 'template') config = configurator (root_factory = root, settings = Settings) config.include ('pyramid_persona') // /////////////////////// Error and rugged config.add_renderer ('.jinja2', pyramid_jinja2.Jinja2Renderer) # Config.add_view (views.hmy_view, ROUTE_NAME = "home" renderer = config.add_view (views.my_view, reference = root, renderer = 'zodiac1.mako') # config.add_route ("home", "/ home" "Zodiac1 .mako ") config.add_static_view (Name = 'static', path = os.path.join (__ here__, 'static')) # config.add_route ('zodiac', '/ zodiac') # config.add_view (views # Config.add_route ('zodiac1', '/ zodiac1') # config.add_view (views.home_view, route_name = 'zodiac1', renderer = 'zodiac1', 'path_name' = 'zodiac', # randerer = 'main.mako' 'Zodiac1.mako') config.add_route ('Zodiac2', '/ zodiac2') config.add_view (views.zodiac2_view, path_name = 'zodiac2', renderer = 'zodiac2.mako') config.add_route ('zodiac3', ' Config.add_route ('hello', '/ hello') config.add_view (views.guestbook, ROUTE_NAME = '/ zodiac3') config.add_view (idea) guest book, path_name = 'zodiac3', renderer = 'zodiac3.mako' 'Zodiac3', renderer = 'zodiac3.mako') Return config Please tell me that I What I'm doing, I'm sure it does not like me: config.include ('pyramid_persona') thanks
With this error:
import error: a module name pyramid_svador You can tell that Python is defined as Pyramid_persona module can not be found. Perhaps because it is not established you should install it from pip install pyramid_persona . You also need to install the browser to get IDID support.
With all the parts it can do complex stitches, so I recommend reading a Ryan Kelly (which works on Mozilla) which shows how to plug everything together. is.
Comments
Post a Comment