1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | from timezones.fields import TimeZoneField
from timezones.zones import PRETTY_TIMEZONE_CHOICES
from south.modelsinspector import add_introspection_rules
import settings
add_introspection_rules(rules=[
((TimeZoneField,),
[],
{
"default": ["default", {"default": settings.TIME_ZONE}],
"choices": ["choices", {"default": PRETTY_TIMEZONE_CHOICES}],
"max_length": ["max_length", {"default":getattr(settings, "MAX_TIMEZONE_LENGTH", 100)}],
}
)
],
patterns=[ 'timezones\.fields', ])
|
More like this
- UTC DateTime field by ludo 5 years, 9 months ago
- Log username in Apache access logs by arthur 3 years, 2 months ago
- Timezone choice field for select box by jmunro 1 year, 2 months ago
- Database migration and dump/load script by akaihola 6 years, 1 month ago
- astimezone template tag by whardier 2 years, 2 months ago
Comments