Remove contenttypes.generic import fallbacks
parent
e0a85c554b
commit
74e0c92455
|
|
@ -6,15 +6,8 @@ from django.conf import settings
|
|||
from django.conf.urls import url
|
||||
from django.contrib.admin import ModelAdmin, TabularInline, StackedInline
|
||||
from django.contrib.admin.options import InlineModelAdmin
|
||||
|
||||
try:
|
||||
from django.contrib.contenttypes.admin import (GenericStackedInline,
|
||||
GenericTabularInline)
|
||||
except:
|
||||
# Django < 1.7
|
||||
from django.contrib.contenttypes.generic import (GenericStackedInline,
|
||||
GenericTabularInline)
|
||||
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.http import HttpResponse, Http404
|
||||
|
|
|
|||
|
|
@ -1,10 +1,4 @@
|
|||
from django import VERSION
|
||||
|
||||
if VERSION < (1, 9):
|
||||
from django.contrib.contenttypes.generic import GenericForeignKey
|
||||
else:
|
||||
from django.contrib.contenttypes.fields import GenericForeignKey
|
||||
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
|
|
|||
Loading…
Reference in New Issue