NameError at /application/
name 'input_formats' is not definedRequest Method: POST
Request URL: http://webapps.stamford.ac.uk/application/
Exception Type: NameError
Exception Value: name 'input_formats' is not defined


On 5 Aug, 12:05, StevenC <spchu...@gmail.com> wrote:
> How so i import input_format
>
> On 5 Aug, 11:51, Daniel Roseman <dan...@roseman.org.uk> wrote:
>
>
>
> > On Aug 5, 11:03 am, StevenC <spchu...@gmail.com> wrote:
>
> > > Hey all!!
>
> > > I have had some validation working but it seems to have stopped. I
> > > want the date format on my form to validate as DD-MM-YYYY so i have
> > > done the following within the view:
>
> > > DOB = forms.DateField(('%d/%m/%Y',),'Date Of Birth',help_text="Please
> > > use the following format: DD/MM/YYYY.")
>
> > > So this used to work, like last week. Now when the form is submitted i
> > > get the following error:
>
> > > Enter a valid date in YYYY-MM-DD format.
>
> > > Why?
>
> > > Any ideas?
> > > Cheers
>
> > It's a bad idea to rely on positional arguments when they are
> > documented as keyword args. Try:
>
> > DOB = forms.DateField(input_formats=('%d/%m/%Y',), label='Date Of
> > Birth',
> >                                    help_text="Please use the following
> > format: DD/MM/YYYY.")
>
> > --
> > DR.- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to