PageRenderTime 40ms CodeModel.GetById 31ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/bangkokhotel/lib/python2.5/site-packages/south/introspection_plugins/django_timezones.py

https://bitbucket.org/luisrodriguez/bangkokhotel
Python | 21 lines | 19 code | 2 blank | 0 comment | 4 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