Roberto Aguilar wrote:
In my situation, what I wanted to do was limit the display of a bunch
of menu items depending on the group of the user. I accomplished this
with a for loop and a test for a group:
{% for group in user.get_list %}
{% ifequal group 'desired_group' %}
[...]
It's a two-step
In my situation, what I wanted to do was limit the display of a bunch
of menu items depending on the group of the user. I accomplished this
with a for loop and a test for a group:
{% for group in user.get_list %}
{% ifequal group 'desired_group' %}
[...]
It's a two-step process rather than one,
On 2/11/06, Luke Skibinski Holt <[EMAIL PROTECTED]> wrote:
>
> > Would it be possible for me to use this function within a template
> > {% if user.is_member_of:"blah" %}
>
> I think calling functions with parameters from within a template was
> deliberately not included for security and simplicity
> Would it be possible for me to use this function within a template
> {% if user.is_member_of:"blah" %}
I think calling functions with parameters from within a template was
deliberately not included for security and simplicity reasons. This
doesn't stop you from evaluating it in the view or writ
Hello,
I wasn't able to find an easy way to check if a user is a member of a
group, so I added the method; here is a patch for:
django/django/models/auth.py
Index: auth.py
===
--- auth.py (revision 2296)
+++ auth.py (workin
5 matches
Mail list logo