PageRenderTime 142ms CodeModel.GetById 80ms app.highlight 2ms RepoModel.GetById 59ms app.codeStats 0ms

/branches/experimental/django_projects/classcomm/south/introspection_plugins/django_timezones.py

http://classcomm.googlecode.com/
Python | 21 lines | 19 code | 2 blank | 0 comment | 2 complexity | 1f68068e9ad4cac39a30e98ce69ced63 MD5 | raw file
 1from south.modelsinspector import add_introspection_rules
 2from django.conf import settings
 3
 4if "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