Robin Percy schrieb:
> Here's a simplified custom tag example using is_authenticated():
>
> class TestTagNode(template.Node):
> def render(self,context):
> return "User is authenticated? %s" %
> context['user'].is_authenticated()
Thanks a lot, I was close, argh! :)
--~--~-
Here's a simplified custom tag example using is_authenticated():
def test_tag(parser, token):
return TestTagNode()
class TestTagNode(template.Node):
def render(self,context):
return "User is authenticated? %s" %
context['user'].is_authenticated()
register.tag('test_tag',test_tag
Robin Percy schrieb:
> It sounds like you're trying to access the user as an attribute rather
> than a key in your tag renderer. Make sure you're using the syntax
> context['user'] as opposed to context.user.
>
I tried both, but if I use context['user'] I could not find a way to
apply is_authe
It sounds like you're trying to access the user as an attribute rather than
a key in your tag renderer. Make sure you're using the syntax
context['user'] as opposed to context.user.
- Robin
On 4/29/07, Marco Gabriel <[EMAIL PROTECTED]> wrote:
>
>
> Hi everyone,
>
> Scenario: I want to build a ma
4 matches
Mail list logo