/branches/experimental/django_projects/classcomm/south/introspection_plugins/django_timezones.py
http://classcomm.googlecode.com/ · Python · 21 lines · 19 code · 2 blank · 0 comment · 4 complexity · 1f68068e9ad4cac39a30e98ce69ced63 MD5 · raw file
- from south.modelsinspector import add_introspection_rules
- from django.conf import settings
- if "timezones" in settings.INSTALLED_APPS:
- try:
- from timezones.fields import TimeZoneField
- except ImportError:
- pass
- else:
- rules = [
- (
- (TimeZoneField, ),
- [],
- {
- "blank": ["blank", {"default": True}],
- "max_length": ["max_length", {"default": 100}],
- },
- ),
- ]
- add_introspection_rules(rules, ["^timezones\.fields",])