PageRenderTime 165ms CodeModel.GetById 104ms RepoModel.GetById 0ms 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 | 4 complexity | 1f68068e9ad4cac39a30e98ce69ced63 MD5 | raw file
Possible License(s): GPL-3.0
  1. from south.modelsinspector import add_introspection_rules
  2. from django.conf import settings
  3. if "timezones" in settings.INSTALLED_APPS:
  4. try:
  5. from timezones.fields import TimeZoneField
  6. except ImportError:
  7. pass
  8. else:
  9. rules = [
  10. (
  11. (TimeZoneField, ),
  12. [],
  13. {
  14. "blank": ["blank", {"default": True}],
  15. "max_length": ["max_length", {"default": 100}],
  16. },
  17. ),
  18. ]
  19. add_introspection_rules(rules, ["^timezones\.fields",])