On Fri, 2008-07-04 at 19:24 -0700, Leaf wrote: > I'm still working on the models.py for Dj Styles. I'm trying to create > a "Style" class, and the part of my code in question looks something > like this: > > class Style(models.Model): > Style-Name = models.CharField("Style Name", Max_length = 32, > Default = "Styles Upon Styles", Help_text = "A user-friendly name for > the style.") > > Before resyncing the database, I hit the "Check Syntax" button in > PythonWin, and it returned "syntax error - can't assign to operator > (models.py, line 37)". Line 37 is the one beginning with Style-Name. I > tried searching the Internet for the syntax error, but couldn't find > anything that was particularly helpful. Does anyone know what's wrong > with my code that could be causing this error?
Python thinks "Style-Name" is "Style - Name". You cannot use hyphens in identifiers. Looks like you need to slow down and take care that your Python is valid when you see these sorts of error messages. 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 -~----------~----~----~----~------~----~------~--~---