summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-03-22 08:49:48 +0000
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-03-22 08:49:48 +0000
commite78d6b406bede7c021aaecf7ae2c8c893e0ea84a (patch)
tree22bd9b1e2cb95232ecabb847c2019944a3e95ba1 /django
parenta8d0fc10015be745c5d274b990d94dfb7d57c9d5 (diff)
Reverted parts of r16963 to fix a regression on the creation of permissions on proxy models. Refs #17904. Thanks koenb for the report and claudep for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/auth/management/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/auth/management/__init__.py b/django/contrib/auth/management/__init__.py
index e792597778..b516507277 100644
--- a/django/contrib/auth/management/__init__.py
+++ b/django/contrib/auth/management/__init__.py
@@ -31,8 +31,8 @@ def create_permissions(app, created_models, verbosity, **kwargs):
searched_perms = list()
# The codenames and ctypes that should exist.
ctypes = set()
- ctypes_for_models = ContentType.objects.get_for_models(*app_models)
- for klass, ctype in ctypes_for_models.iteritems():
+ for klass in app_models:
+ ctype = ContentType.objects.get_for_model(klass)
ctypes.add(ctype)
for perm in _get_all_permissions(klass._meta):
searched_perms.append((ctype, perm))