Re: {% if method(arguments) %}

2005-09-11 Thread Mookai
Although I thought it would work, it isn't working, or I am doing something wrong: {% for app in app_list %} {% if perms.app.name %} ... some html code {% endif %} {% endfor %} This won't work, because in: class PermLookupDict: def __init__(self, user, module_name): self.user, self.

Re: {% if method(arguments) %}

2005-09-11 Thread Mookai
Great! The world of Django is getting better and better :D Thanks!

Re: {% if method(arguments) %}

2005-09-11 Thread Simon Willison
On 11 Sep 2005, at 20:16, Mookai wrote: Is it possible to use this syntax of do I have to write an own template tag? I want to use it to check if a module has to be displayed based on permissions: {% if user.get_module_perms(app.name) %} That syntax won't work - but the magic perms varia

Re: {% if method(arguments) %}

2005-09-11 Thread Mookai
Erm, I mean user.has_module_perms

{% if method(arguments) %}

2005-09-11 Thread Mookai
Is it possible to use this syntax of do I have to write an own template tag? I want to use it to check if a module has to be displayed based on permissions: {% if user.get_module_perms(app.name) %} But this doen't work