Skip to content

Commit

Permalink
Fix 2degrees#14 - support djeneralize.fields.SpecializedForeignKey in…
Browse files Browse the repository at this point in the history
… South migrations
  • Loading branch information
rhunwicks committed Jan 26, 2014
1 parent f84d687 commit dd64a70
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions djeneralize/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,12 @@ def __get__(self, instance, instance_type=None):
return related_object

#}

# allow South to handle these fields smoothly
# Because SpecializedForeignKey inherits from ForeignKey and does not add any new
# arguments, no special introspection rules are needed.
try:
from south.modelsinspector import add_introspection_rules
add_introspection_rules(rules=[], patterns=['^djeneralize\.fields\.SpecializedForeignKey'])
except ImportError:
pass

0 comments on commit dd64a70

Please sign in to comment.