summaryrefslogtreecommitdiff
path: root/chimere/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-01-17 22:59:06 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-01-17 22:59:06 +0100
commit3daa945c334f719e7edb086021bfcc93880eb7f7 (patch)
tree31a66ee019154c6e3bec6346e74c020a4f204510 /chimere/models.py
parentb29e9b60e276a0417aefaa8a3f5024d06936bccf (diff)
downloadChimère-3daa945c334f719e7edb086021bfcc93880eb7f7.tar.bz2
Chimère-3daa945c334f719e7edb086021bfcc93880eb7f7.zip
Add boolean type for dynamic fields
Diffstat (limited to 'chimere/models.py')
-rw-r--r--chimere/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/chimere/models.py b/chimere/models.py
index 59c836d..d0861a0 100644
--- a/chimere/models.py
+++ b/chimere/models.py
@@ -1651,13 +1651,15 @@ class PropertyModel(models.Model):
('L', _('Long text')),
('P', _('Password')),
('D', _("Date")),
+ ('B', _("Boolean")),
('C', _("Choices")),
)
TYPE_WIDGET = {'T':forms.TextInput,
'L':TextareaWidget,
'P':forms.PasswordInput,
'D':DatePickerWidget,
- 'C':forms.Select
+ 'C':forms.Select,
+ 'B':forms.CheckboxInput,
}
type = models.CharField(_(u"Type"), max_length=1, choices=TYPE)
def __unicode__(self):