On Dec 29, 2006, at 11:12 AM, ben adam wrote:
barrel auth is supposed to work with any wsgi app, so it should work
with a controller which is a wsgi app, but the following doesn't work.
I get the form to authenticate but after that it just hangs & doesn't
render the template....
===========================
from barrel import cooper
logins = [('joe', 'foo'), ('sam', 'eggs'), ('mark', 'that')]
roles = dict(joe=['admin', 'user'], sam=['user'])
@cooper.formauth(users=logins)
@cooper.rolesauth(roles_dict=roles, allowed_roles=['admin'])
def AboutController(environ, start_response):
return render_response('about/us.myt')
===========================
render_response will return a WSGI Response object, not a full WSGI
response. To return a full WSGI response with the resulting WSGI
Response object, you can call it as a WSGI app like so:
def AboutController(environ, start_response):
return render_response('about/us.myt')(environ, start_response)
If that doesn't work, can you send me your about/us.myt template so I
can duplicate the issue?
HTH,
Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---