Задать вопрос

Тел: +7 965 3737 888

453

Просмотров

1

Ответов

RangeField and RangeWidget

<p>These field and widget are util for to those fields where you can put a star and end values.</p>
<p>It supports most of field types and widgets (tested with IntegerField, CharField and DateField / TextInput and a customized DateInput).</p>
<p><strong>Example of use:</strong></p>
class FormSearch(forms.Form):
    q = forms.CharField(max_length=50, label=_('Search for'))
    price_range = RangeField(forms.IntegerField, required=False)

<p><strong>Example of use (with forced widget):</strong></p>
class FormSearch(forms.Form):
    q = forms.CharField(max_length=50, label=_('Search for'))
    price_range = RangeField(forms.IntegerField, widget=MyWidget)

Вопрос полезен? Да0/Нет0
file_2730.py(1.4Кб)
None

Ответы (1):

Ответjjudge:09.08.2009
Ответ полезен? Да0/Нет0

Can we get an example of a 'widgets/range_widget.html'??