Hi all,

I wish to have an extra date field in my ModelForm. When I do it as
follows, it works fine:

class NoteForm(forms.ModelForm):
    date = DateField(required=False)

    def clean_date(self):
        # do the validation ...
        return self.cleaned_data

    class Meta:
        model = Note


But I wish to use a MultiValueField instead of a DateField. So I
defined a custom date field derived from MultiValueField and used it
as follows:

class NoteForm(forms.ModelForm):
    date = HistoricDateField()
    ...

The form is displayed as I expect, but now clean_date() method of the
form is not called and cleaned_data does not have the data for 'date'.

Am I missing something or is it a bug?


Thanks,
omat

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to