Commit 1116a534 by kazmiruk

add compatibility for django 1.6

parent b3e03cd8
...@@ -16,7 +16,7 @@ import datetime ...@@ -16,7 +16,7 @@ import datetime
import inspect import inspect
import types import types
from decimal import Decimal from decimal import Decimal
from django.contrib.contenttypes.fields import GenericForeignKey import django
from django.core.paginator import Page from django.core.paginator import Page
from django.db import models from django.db import models
from django.forms import widgets from django.forms import widgets
...@@ -41,6 +41,11 @@ try: ...@@ -41,6 +41,11 @@ try:
except ImportError: except ImportError:
from django.utils.datastructures import SortedDict as OrderedDict from django.utils.datastructures import SortedDict as OrderedDict
if django.VERSION >= (1, 8):
from django.contrib.contenttypes.fields import GenericForeignKey
else:
from django.contrib.contenttypes.generic import GenericForeignKey
def _resolve_model(obj): def _resolve_model(obj):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment