diff options
Diffstat (limited to 'chimere/models.py')
-rw-r--r-- | chimere/models.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chimere/models.py b/chimere/models.py index 5727098..20efb2d 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -682,7 +682,7 @@ class Marker(GeographicItem): def default_category(self): # Should we select only available ones ? # Should we catch if not exists ? - cats = self.categories + cats = self.categories.filter(available=True, category__available=True) if cats.count(): return cats.all()[0] @@ -1539,12 +1539,14 @@ class PropertyModel(models.Model): ('P', _('Password')), ('D', _("Date")), ('C', _("Choices")), + ('B', _("Boolean")), ) 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): |