Hi
I need to make an custom tag, for auth checks, based on data stored on
cookies. Like a:
{% if_loggen_in %}
<span>Some message for logged in only user</span>
{% end_if_logged_in %}
btw, i don't know how to get access to request object in my tag. I know that
there is 'inclusion tags', but as you see there is nothing to include, my
tag just renders data based on current request data.
I know about .request middleware and RequestContext class, but this tag can
be used anywhere (and at least it used in main layout, so it used in every
page), so the way when I use RequestContext(context) in every possible view
is too complex.
How can i get access to it from custom tag? Can i make it use RequestContext
by default?
--
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en.