1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

Fixed #18991 -- Allowed permission lookup by "if in"

When looking permissions from PermWrapper it is now possible to use
{% if "someapp.someperm" in perms %} instead of
{% if perms.someapp.someperm %}.
This commit is contained in:
Anssi Kääriäinen
2012-09-30 18:13:23 +03:00
parent c2532825db
commit d5a4f209c3
7 changed files with 75 additions and 7 deletions

View File

@@ -180,6 +180,10 @@ Django 1.5 also includes several smaller improvements worth noting:
and inversion, expanding the types of expressions that can be passed to the
database.
* When using :class:`~django.template.RequestContext`, it is now possible to
look up permissions by using ``{% if 'someapp.someperm' in perms %}``
in templates.
Backwards incompatible changes in 1.5
=====================================