root / env / lib / python2.7 / site-packages / south / introspection_plugins / django_tagging.py @ d1a4905f
History | View | Annotate | Download (711 Bytes)
1 |
from south.modelsinspector import add_introspection_rules |
---|---|
2 |
from django.conf import settings |
3 |
|
4 |
if "tagging" in settings.INSTALLED_APPS: |
5 |
try:
|
6 |
from tagging.fields import TagField |
7 |
except ImportError: |
8 |
pass
|
9 |
else:
|
10 |
rules = [ |
11 |
( |
12 |
(TagField, ), |
13 |
[], |
14 |
{ |
15 |
"blank": ["blank", {"default": True}], |
16 |
"max_length": ["max_length", {"default": 255}], |
17 |
}, |
18 |
), |
19 |
] |
20 |
add_introspection_rules(rules, ["^tagging\.fields",])
|
21 |
|
22 |
if "tagging_autocomplete" in settings.INSTALLED_APPS: |
23 |
add_introspection_rules([], ["^tagging_autocomplete\.models\.TagAutocompleteField"])
|
24 |
|