From 647f527cf506b362ff02ddf58da2490768b8bf7a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sat, 18 Aug 2012 23:52:59 +0200 Subject: Add "Date" to property models types --- chimere/models.py | 8 +++++--- 1 file 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 -- cgit v1.2.3