Re: Auth permitions in templates

2009-05-31 Thread Gabriel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Rapis escribió: > Second always set context_instance to RequestContext: > render_to_response("some_template.html", {}, > context_instance=RequestContext(request)) > > Annoying thing, that I can't forget to do it in one way, and also I > have to

Re: Auth permitions in templates

2009-05-31 Thread Rapis
Hello, I had similar problem, what I couldn't access user object in templates. Now I have to solutions, and both of them are annoying. First always pass a user to template: render_to_response("some_template.html", {'user':request.user}) Second always set context_instance to RequestContext:

Re: Auth permitions in templates

2009-04-15 Thread Gil Sousa
Thanks a lot :) It works now :) On 15 Abr, 13:58, Daniel Roseman wrote: > On Apr 15, 11:56 am, Gil Sousa wrote: > > > I am new with django, sorry about this kind of questions. > > > I don't know how to pass the 'user' variable into the

Re: Auth permitions in templates

2009-04-15 Thread Daniel Roseman
On Apr 15, 11:56 am, Gil Sousa wrote: > I am new with django, sorry about this kind of questions. > > I don't know how to pass the 'user' variable into the template, how > can I do that? > > Thanks for your help! > The same way you pass all the other variables when you

Re: Auth permitions in templates

2009-04-15 Thread Gil Sousa
I am new with django, sorry about this kind of questions. I don't know how to pass the 'user' variable into the template, how can I do that? Thanks for your help! On 15 Abr, 11:39, Daniel Roseman wrote: > On Apr 15, 9:32 am, Gil Sousa wrote:

Re: Auth permitions in templates

2009-04-15 Thread Daniel Roseman
On Apr 15, 9:32 am, Gil Sousa wrote: > Hi! > > I have one menu that I use as a "base" template, this menu has some > entries which some of them should be restricted to logged users, but > even when I loggin I cannot see those entries. > > This is my menu.html: > >

Auth permitions in templates

2009-04-15 Thread Gil Sousa
Hi! I have one menu that I use as a "base" template, this menu has some entries which some of them should be restricted to logged users, but even when I loggin I cannot see those entries. This is my menu.html: http://www.w3.org/1999/xhtml;> {% block title %}{% endblock %}