Update permission.py

This commit is contained in:
arthur 2016-05-08 00:12:53 +02:00
parent 54f710055a
commit cb91aabcf4

View file

@ -22,7 +22,7 @@ import re
from django.contrib.auth import models as auth_models
from django.contrib.contenttypes import models as contenttypes_models
from django.db.models import get_models
from django.apps import apps
from django.utils import six
from . import utils
@ -381,7 +381,7 @@ def create_view_permissions(app, created_models, verbosity, **kwargs):
"""
# Is there any reason for doing this import here?
app_models = get_models(app)
app_models = apps.get_models(app)
# This will hold the permissions we're looking for as
# (content_type, (codename, name))