Reputation: 439
i got this error while trying to get django admin running on my web app.
SyntaxError at /admin/
invalid syntax (admin.py, line 1)
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.3.1
Exception Type: SyntaxError
Exception Value:
invalid syntax (admin.py, line 1)
Exception Location: /Library/Python/2.7/site-packages/django/utils/importlib.py in import_module, line 35
Python Executable: /usr/bin/python
Is there any solution for this?
I've tried googling but its a strange error.
The best part, there is no admin.py file in my web app.
Any help would be much appreciated. :)
Upvotes: 1
Views: 603
Reputation: 21243
When you remove comments from admin.py
make sure that you remove the leading spaces from that lines also.
Please check that file and if this will not solve the problem then give the context of admin.py
Upvotes: 1