Re: Error was: 'module' object has no attribute 'Form'

2008-11-30 Thread Malcolm Tredinnick


On Sun, 2008-11-30 at 16:25 -0800, Andrew Arrow wrote:
> Trying to get the example from
> 
> http://docs.djangoproject.com/en/dev/topics/forms/
> 
> to work.  I copied and pasted:
> 
> from django import forms
> 
> class ContactForm(forms.Form):
> subject = forms.CharField(max_length=100)
> message = forms.CharField()
> sender = forms.EmailField()
> cc_myself = forms.BooleanField(required=False)
> 
> but get this error everytime:
> 
> ViewDoesNotExist at /
> Tried main in module myapp.main.views. Error was: 'module' object has
> no attribute 'Form'

Are you sure you're using Django 1.0? Because that should work
perfectly. At a minimum, you can try this sort of test:

`--> ./manage.py shell

[...banner snipped...]

In [1]: from django import forms

In [2]: forms.Form
Out[2]: 

If that doesn't work, you are running an old version of Django by
mistake.

Regards,
Malcolm



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



Error was: 'module' object has no attribute 'Form'

2008-11-30 Thread Andrew Arrow

Trying to get the example from

http://docs.djangoproject.com/en/dev/topics/forms/

to work.  I copied and pasted:

from django import forms

class ContactForm(forms.Form):
subject = forms.CharField(max_length=100)
message = forms.CharField()
sender = forms.EmailField()
cc_myself = forms.BooleanField(required=False)

but get this error everytime:

ViewDoesNotExist at /
Tried main in module myapp.main.views. Error was: 'module' object has
no attribute 'Form'

any ideas?  thanks

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