Closed mauricioschneider closed 9 years ago
Thanks for kind words, I will move some things around when I update the tutorial to work with python 3.
On Thu, Jun 13, 2013 at 12:44 PM, Mauricio Schneider < notifications@github.com> wrote:
The index.mako template in the authentication topichttp://pyramid-blogr.readthedocs.org/en/latest/authentication.htmlshows the following code:
<%from pyramid.security import authenticated_useriduser_id = authenticated_userid(request)%>
I was wondering if it wouldn't be better to put that code in the views.py file instead, and send just the user_id variable to the template? I mean, to keep things in order.
Yes. If an exception occurs during Mako rendering, sometimes the traceback is obscure or completely useless for telling which expression or template line caused it.
Mike Orr sluggoster@gmail.com
this is now obsolete, pyramid 1.5 version of tutorial does this differently :-)
The index.mako template in the authentication topic shows the following code:
I was wondering if it wouldn't be better to put that code in the views.py file instead, and send just the user_id variable to the template? I mean, to keep things in order.
PS: I'm loving your tutorial, I find it way better and clearer than the official one!