I am already using Pyramid auth, but to bend it for the new feature I'd 
have to edit _every_ add_view(), which will make it an even worse hack than 
my current tween hack, where I need to manually recreate the attributes 
used in the template, notably the missing matched_route --

def signup_hack_tween_factory(handler, registry):
    def signup_hack_tween(request):
        if request.user and not request.user.user_name and request.method 
== 'POST':
            request.c['h'] = helpers
            request.matched_route = Mock()
            settings = registry.settings
            request.RedisCache = settings['RedisCache']
            return render_to_response('templates/signup_hack.genshi', 
request.c, request)
        else:
            try:
                response = handler(request)
            finally:
                return response

    return signup_hack_tween


Jerry

On Monday, April 8, 2013 11:18:32 PM UTC+8, Jonathan Vanasco wrote:
>
> are you using Pyramid's auth already ? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to