Skip to content

Commit

Permalink
Merge pull request #43 from suriya/develop
Browse files Browse the repository at this point in the history
Fix DeprecationWarning when importing GenericForeignKey
  • Loading branch information
klen committed Aug 12, 2015
2 parents 66d03eb + 58dc709 commit 1f1784a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mixer/backend/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@

import decimal
from django import VERSION
from django.contrib.contenttypes.generic import (
GenericForeignKey, GenericRelation)
if VERSION < (1, 8):
from django.contrib.contenttypes.generic import (
GenericForeignKey, GenericRelation)
else:
from django.contrib.contenttypes.generic.fields import (
GenericForeignKey, GenericRelation)
from django.contrib.contenttypes.models import ContentType
from django.core.files.base import ContentFile
from django.core.validators import (
Expand Down

0 comments on commit 1f1784a

Please sign in to comment.