Commit ea0ba87f by Collin Anderson

fix contenttypes.generic warning in django 1.7

parent e6c90946
...@@ -2,7 +2,10 @@ from __future__ import unicode_literals ...@@ -2,7 +2,10 @@ from __future__ import unicode_literals
from operator import attrgetter from operator import attrgetter
from django import VERSION from django import VERSION
from django.contrib.contenttypes.generic import GenericRelation try:
from django.contrib.contenttypes.fields import GenericRelation
except ImportError: # django < 1.7
from django.contrib.contenttypes.generic import GenericRelation
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.db import models, router from django.db import models, router
from django.db.models.fields import Field from django.db.models.fields import Field
......
from __future__ import unicode_literals from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.generic import GenericForeignKey try:
from django.contrib.contenttypes.fields import GenericForeignKey
except ImportError: # django < 1.7
from django.contrib.contenttypes.generic import GenericForeignKey
from django.db import models, IntegrityError, transaction from django.db import models, IntegrityError, transaction
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from django.template.defaultfilters import slugify as default_slugify from django.template.defaultfilters import slugify as default_slugify
......
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 sign in to comment