I have a form set up and all working, its basically straight out of
the Form Processing chapter of the django book:

class ContactForm(forms.Form):
    email = forms.EmailField(required=True)
    message = forms.CharField()
    phone_number = forms.CharField()

def contact(request):
    form = ContactForm()
    return render_to_response('contact.html', {'form': form})

Now this works just fine, but I want to use
django.contrib.localflavor.us.forms.USPhoneNumberFIeld instead of the
CharField for the phone_number.  When I replace it with this line:

phone_number = us.forms.USPhoneNumberField(max_length=100)

I get this error:

ViewDoesNotExist: Tried contact in module mysite.contact.views. Error
was: 'module' object has no attribute 'forms'

What am I doing wrong?
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to