Skip to content

Commit

Permalink
Handle GFK import from both places
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Mar 25, 2015
1 parent b9097d3 commit 8a4f9e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pinax/referrals/compat.py
@@ -0,0 +1,4 @@
try:
from django.contrib.contenttypes.fields import GenericForeignKey
except ImportError:
from django.contrib.contenttypes.generic import GenericForeignKey # noqa
2 changes: 1 addition & 1 deletion pinax/referrals/models.py
Expand Up @@ -6,9 +6,9 @@
from django.utils.encoding import python_2_unicode_compatible

from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.sites.models import Site

from .compat import GenericForeignKey
from .conf import settings
from .signals import user_linked_to_response

Expand Down

0 comments on commit 8a4f9e1

Please sign in to comment.