Hi Steve, That was the problem. My django package was corrupted. Reinstalling django package worked.
Thanks, Karthik On Sep 17, 4:56 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Karthik Krishnan wrote: > > Hi Norman, > > > But if I have an empty file, models.py, that should thrown an error. > > > Thanks, > > > Kartik > > > On Sep 17, 1:45 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote: > > >> [...] > >>> from django.db.models.fields import DateField > >>> File "C:\tools\Python25\lib\site-packages\django\db\models\fields > >>> \__init__.py" > >>> , line 666 > >>> class DecimalField(max_digits = 32, decimal_places = > >>> 0)IntegerField(Field): > >>> ^ > >>> SyntaxError: invalid syntax > > >>> The stack trace does not define which line has an incorrect syntax. I > >>> am having this error even there is nothing in the models.py file. > > >> It says it happened on line 666 of > >> C:\tools\Python25\lib\site-packages\django\db\models\fields\__init__.py > >> just at the equals sign "max_digits = 32". > > The listed Python is very definitely in error. Since it seems that your > fields/__init__.py is hosed you might want to think about reinstalling > Django. It appears to contain the keyword "class" followed by a function > call: it looks as though you have accidentally pasted some of your own > code into the package initializer while examining it. > > regards > Steve --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---