|
@@ -1,9 +1,17 @@
|
|
|
from django.contrib.admin import RelatedFieldListFilter
|
|
|
-from django.contrib.admin.utils import get_model_from_relation
|
|
|
-from django.core.urlresolvers import reverse
|
|
|
-from django.forms.utils import flatatt
|
|
|
from django.utils.encoding import smart_text
|
|
|
from django.utils.html import format_html
|
|
|
+from django.core.urlresolvers import reverse
|
|
|
+
|
|
|
+try:
|
|
|
+ from django.contrib.admin.utils import get_model_from_relation
|
|
|
+except ImportError: # Django 1.6
|
|
|
+ from django.contrib.admin.util import get_model_from_relation
|
|
|
+
|
|
|
+try:
|
|
|
+ from django.forms.utils import flatatt
|
|
|
+except ImportError: # Django 1.6
|
|
|
+ from django.forms.util import flatatt
|
|
|
|
|
|
|
|
|
class RelatedFieldAjaxListFilter(RelatedFieldListFilter):
|