See inline:
Cheers
Tom
On Thu, Sep 1, 2011 at 10:38 AM, Szabo, Patrick (LNG-VIE) <
patrick.sz...@lexisnexis.at> wrote:
> Hi,
>
> ** **
>
> I want to create my own templatetag that returns true if a user is member
> of a certain group.
>
> I did the following:
>
> ** **
>
> Created
Von: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick
(LNG-VIE)
Gesendet: Donnerstag, 01. September 2011 11:39
An: django-users@googlegroups.com
Betreff: custom templatetag that checks groups
Hi,
I want to create my own templatetag that retur
Hi,
I want to create my own templatetag that returns true if a user is
member of a certain group.
I did the following:
Created a package "templatetags" in my app.
Wrote a module:
from django import template
register = template.Library()
def check(user):
if str(user.groups
3 matches
Mail list logo