S. Thanks! I'm completely new to Python (guess I should have paid more attention to variable names). I might have tried removed the dash sooner but I was following how it was typed in the book. I'll have to file a type with the author. Thanks again.
On Jul 22, 5:56 am, Simon Holness <[email protected]> wrote: > "e-mail" can't have a hyphen in it. Python thinks you're "assigning" > to the operation e - mail > > just type into a shell to see. > > e-mail = "blah" > SyntaxError: can't assign to operator > > rename to e_mail or email or something and you should be good to go > > On 22 July 2010 06:10, strayhand <[email protected]> wrote: > > > 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 > > athttp://groups.google.com/group/django-users?hl=en. -- 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.

