-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 rep
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:
rend
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 template, how
> > can I do that?
>
> > Thanks for your hel
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 render the
template.
Or,
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:
>
>
>
> > Hi!
>
> > I have one menu that I use as a
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:
>
> "http://www.w3.org/TR/xhtml1/DT
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 %}
7 matches
Mail list logo