Skip to content

Commit

Permalink
Django 1.8: Fix tests for prior versions of Django
Browse files Browse the repository at this point in the history
  • Loading branch information
darklow committed Apr 22, 2015
1 parent 73f7110 commit 98c296d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions suit/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
from django.conf import settings
from django.contrib.admin import ModelAdmin
from django.contrib.admin.views.main import ChangeList
from django.contrib.contenttypes.admin import GenericTabularInline, \
GenericStackedInline
from django.forms import ModelForm
from django.contrib import admin
from django.db import models
from suit.widgets import NumberInput, SuitSplitDateTimeWidget
try:
# Django 1.8 +
from django.contrib.contenttypes import admin as ct_admin
except ImportError:
from django.contrib.contenttypes import generic as ct_admin


class SortableModelAdminBase(object):
Expand Down Expand Up @@ -66,7 +69,7 @@ class SortableTabularInline(SortableTabularInlineBase, admin.TabularInline):


class SortableGenericTabularInline(SortableTabularInlineBase,
GenericTabularInline):
ct_admin.GenericTabularInline):
pass


Expand Down Expand Up @@ -129,7 +132,7 @@ class SortableStackedInline(SortableStackedInlineBase, admin.StackedInline):


class SortableGenericStackedInline(SortableStackedInlineBase,
GenericStackedInline):
ct_admin.GenericStackedInline):
pass


Expand Down

0 comments on commit 98c296d

Please sign in to comment.