I understood that, i just thought there is some nicer way to do it :)
Thx.
On Wed, May 20, 2009 at 11:52 PM, Sam Chuparkoff wrote:
>
> On Wed, 2009-05-20 at 07:09 -0700, [CPR]-AL.exe wrote:
> > So, what is the best way to throw a ValidationError only if None of
> > values a entered in subclasse
On Wed, 2009-05-20 at 07:09 -0700, [CPR]-AL.exe wrote:
> So, what is the best way to throw a ValidationError only if None of
> values a entered in subclassed field?
I don't know if you understood my post or read the code for
MultiValueField. MultiValueField is designed to check for empty values
a
So, what is the best way to throw a ValidationError only if None of
values a entered in subclassed field?
On 19 май, 23:10, Sam Chuparkoff wrote:
> On Mon, 2009-05-18 at 10:13 -0700, [CPR]-AL.exe wrote:
> > I've created a field+widget set that i use to render a number of
> > checkboxes and a Tex
On Mon, 2009-05-18 at 10:13 -0700, [CPR]-AL.exe wrote:
> I've created a field+widget set that i use to render a number of
> checkboxes and a TextInput with comma-separated values.
>
> The problem is, when i set required = True, I get a ValidationError if
> only checkboxes are selected (but i don'
It is required
On 19 май, 08:05, Thierry wrote:
> Isn't required the default behaviour of Field:
>
> http://docs.djangoproject.com/en/dev/ref/forms/fields/
>
> From the above code, TextInput is required:
>
> forms.TextInput(),
>
> On May 18, 1:15 pm, "[CPR]-AL.exe" wrote:
>
> > class CheckboxSe
And so? I don't get you. How can i requere that the user will select a
checkbox OR input some text in TextInput?
2009/5/19 Thierry
> Isn't required the default behaviour of Field:
>
> http://docs.djangoproject.com/en/dev/ref/forms/fields/
>
> From the above code, TextInput is required:
>
> forms
Isn't required the default behaviour of Field:
http://docs.djangoproject.com/en/dev/ref/forms/fields/
From the above code, TextInput is required:
forms.TextInput(),
On May 18, 1:15 pm, "[CPR]-AL.exe" wrote:
> class CheckboxSelectWithTextInputWidget(forms.MultiWidget):
>
> def __init__(sel
class CheckboxSelectWithTextInputWidget(forms.MultiWidget):
def __init__(self,choices, attrs=None):
widgets = (
forms.CheckboxSelectMultiple(choices = choices),
forms.TextInput(),
)
super(CheckboxSelectWithTextInputWidget,self).__init__
(widget
Hello there.
I've created a field+widget set that i use to render a number of
checkboxes and a TextInput with comma-separated values.
The problem is, when i set required = True, I get a ValidationError if
only checkboxes are selected (but i don't get it if TextInput is
filled)
Here are the clas
9 matches
Mail list logo