3

I have an app that makes user of filtering certain things for users with different permissions.

Django 1.1 does for some reason not seem to recognize these.

I have a group called corporate and permissions are granted as needed.

now in my template I am render the following.

{% if perms.corporate %}
...show the following
{% else %}
... show something else
{% endif %}

why is this not rendering the info I want?

4

1 に答える 1

4

perms.corporateへのプロキシUser.has_module_perms('corporate')。したがって、モジュール (またはアプリ) に というラベルを付ける必要がありますcorporate。あなたの現在の会社はグループだとおっしゃっていますが、これはおそらくうまくいかないでしょう。

于 2010-07-20T10:26:02.623 に答える