Project

General

Profile

Statistics
| Branch: | Revision:

root / env / lib / python2.7 / site-packages / south / introspection_plugins / django_timezones.py @ d1a4905f

History | View | Annotate | Download (583 Bytes)

1
from south.modelsinspector import add_introspection_rules
2
from django.conf import settings
3

    
4
if "timezones" in settings.INSTALLED_APPS:
5
    try:
6
        from timezones.fields import TimeZoneField
7
    except ImportError:
8
        pass
9
    else:
10
        rules = [
11
            (
12
                (TimeZoneField, ),
13
                [],
14
                {
15
                    "blank": ["blank", {"default": True}],
16
                    "max_length": ["max_length", {"default": 100}],
17
                },
18
            ),
19
        ]
20
        add_introspection_rules(rules, ["^timezones\.fields",])
21