Help with Debugging

Cai Gengyang gengyangcai at
Mon Sep 28 08:33:12 CEST 2015

I am glad to announce that it works now ! The error was an addition random 'qq' that somehow appeared in my file on line 44. Once I spotted and removed it , the code works. I have pasted the entire successful piece of code here for viewing and discussion ...

CaiGengYangs-MacBook-Pro:~ CaiGengYang$ cd mysite folder
CaiGengYangs-MacBook-Pro:mysite CaiGengYang$ ls	mysite
CaiGengYangs-MacBook-Pro:mysite CaiGengYang$ python migrate
Operations to perform:
  Synchronize unmigrated apps: staticfiles, messages
  Apply all migrations: admin, contenttypes, auth, sessions
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
  Installing custom SQL...
Running migrations:
  Rendering model states... DONE
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying sessions.0001_initial... OK
CaiGengYangs-MacBook-Pro:mysite CaiGengYang$ 

On Monday, September 28, 2015 at 2:20:39 PM UTC+8, Andrea D'Amore wrote:
> On 2015-09-28 05:26:35 +0000, Cai Gengyang said:
> >   File "/Users/CaiGengYang/mysite/mysite/", line 45
> > 
> >     'django.middleware.csrf.CsrfViewMiddleware',
> > 
> >                                               ^
> > 
> > SyntaxError: invalid syntax
> The syntax looks fine in the pastebin, did you possibly copy text from 
> web thus pasting smartquotes or unprintables in your source file?
> -- 
> Andrea

More information about the Python-list mailing list