I apologize in advance if i'm posting this question in the wrong area.
I'm learning about django's form class in "The Definitive Guide To
Django" and for some reason that's beyond me I keep getting a syntax
error. I've been over my code a dozen times and I'm hoping that
someone can point me in the right direction.
(Taken from page 133-134)
contactforms.py
from django import forms
class ContactForm(forms.Form):
subject = forms.CharField()
e-mail = forms.EmailField(required=False)
message = forms.CharField()
When I jump into the shell and type the following I get the syntax
error:
from contactforms import ContactForms
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/bealtr/Personal/YLBBQ/Django Projects/ylbbq/
contactforms.py", line 5
e-mail = forms.EmailField(required=False)
SyntaxError: can't assign to operator
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 [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.