#7685: Error in Code example "local flavor"
---------------------------+------------------------------------------------
 Reporter:  bernd          |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Documentation  |     Version:  SVN       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 The first Code example don't work.

 http://www.djangoproject.com/documentation/localflavor/

 {{{
 from django import newforms as forms
 from django.contrib.localflavor import fr

 class MyForm(forms.Form):
     my_french_phone_no = fr.forms.FRPhoneNumberField()

 }}}

 get this error/traceback:

 {{{
 Traceback (most recent call last):
   File "<console>", line 1, in <module>
   File "<console>", line 2, in MyForm
 AttributeError: 'module' object has no attribute 'forms'
 }}}

 This works for me (changed the import part)


 {{{
 from django import newforms as forms
 from django.contrib.localflavor.fr.forms import FRPhoneNumberField

 class MyForm(forms.Form):
     my_french_phone_no = FRPhoneNumberField()

 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7685>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to