Additional i've created example project with all LocalFlavor Fields.
It's based on my patch with Polish Localflavor
(now it's only on my page. If everything is fine in next few days with
it, i'll post it to the Django Trac ticket system for future
inclusion).
Mini-example is provieded on the following page:
http://slawek.mikula.googlepages.com/djangolocalflavorexample

On Aug 15, 9:12 pm, zorba <[EMAIL PROTECTED]> wrote:
> On Aug 15, 2:27 pm, zorba <[EMAIL PROTECTED]> wrote:
>
>
>
> > After some searching i've gave up with select field with localflavor
> > select widget.
> > Could someone give an example of this code ?
>
> > My current code:
>
> > from django.contrib.localflavor.us.forms import *
>
> > class LocalForm(forms.Form):
> >     testchoice = [('test','select')]
> >     test = forms.ChoiceField(choices=testchoice) # works just fine
> >     state = USStateSelect() # doesn't work at all
> >     state_new = forms.Choicefield(widget=USStateSelect()) # renders
> > empty select field
>
> > Any help greatly appreciated.
>
> FYI, problem solved. It should be:
>
>  state_new = forms.CharField(widget=USStateSelect())
>
> solution found in newforms.txt file, but only found in one place and
> quite hidden


--~--~---------~--~----~------------~-------~--~----~
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