diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-08-18 23:52:59 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-08-18 23:52:59 +0200 |
commit | 647f527cf506b362ff02ddf58da2490768b8bf7a (patch) | |
tree | 681b2186316d9011d1c8b0b2614afd6b29e54fc6 /chimere/models.py | |
parent | 671e6e1344a6797f8584363472a33ba1b9f9e2c6 (diff) | |
download | Chimère-647f527cf506b362ff02ddf58da2490768b8bf7a.tar.bz2 Chimère-647f527cf506b362ff02ddf58da2490768b8bf7a.zip |
Add "Date" to property models types
Diffstat (limited to 'chimere/models.py')
-rw-r--r-- | chimere/models.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chimere/models.py b/chimere/models.py index 2d9d749..c053e1b 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -38,7 +38,7 @@ from django import forms from django.utils.translation import ugettext_lazy as _ from chimere.widgets import PointField, RouteField, SelectMultipleField, \ - TextareaWidget + TextareaWidget, DatePickerWidget from chimere.managers import BaseGeoManager from chimere.utils import KMLManager, OSMManager, ShapefileManager @@ -895,10 +895,12 @@ class PropertyModel(models.Model): u"sub-categories")) TYPE = (('T', _('Text')), ('L', _('Long text')), - ('P', _('Password'))) + ('P', _('Password')), + ('D', _("Date"))) TYPE_WIDGET = {'T':forms.TextInput, 'L':TextareaWidget, - 'P':forms.PasswordInput} + 'P':forms.PasswordInput, + 'D':DatePickerWidget} type = models.CharField(_(u"Type"), max_length=1, choices=TYPE) def __unicode__(self): return self.name |