Changes between Version 1 and Version 2 of Ticket #9230, comment 15


Ignore:
Timestamp:
May 22, 2015, 1:55:39 AM (9 years ago)
Author:
Gerben Morsink

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9230, comment 15

    v1 v2  
    22
    33The {{field.repeat_weekday}} is always empty in my template, so looping over it wont work to create the checkboxes.
     4
     5I have overriden the render method in my widget, but that should not matter I think since I only change the value and then call the original render:
     6{{{
     7class BinaryMultipleSelectBox(forms.CheckboxSelectMultiple):
     8    def render(self, name, value, attrs=None, choices=()):
     9        if value is None:
     10            value = []
     11        else:
     12            value = TemplateEventMeta.WEEKDAYS.get_selected_values(value)
     13        return forms.CheckboxSelectMultiple.render(self, name, value, attrs=attrs, choices=choices)
     14}}}
Back to Top