2014-01-05 69 views
1
File "/home/jc/tryout/mydjangoproject/mydjangoproject/settings.py", line 1 
\""" 
^
SyntaxError: unexpected character after line continuation character 

我的settings.py是:'manage.py殼' 給語法錯誤settings.py

""" 
Django settings for mydjangoproject project. 

For more information on this file, see 
https://docs.djangoproject.com/en/1.6/topics/settings/ 

For the full list of settings and their values, see 
https://docs.djangoproject.com/en/1.6/ref/settings/ 
""" 

# Build paths inside the project like this: os.path.join(BASE_DIR, ...) 
import os 
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) 

# SECURITY WARNING: keep the secret key used in production secret! 
SECRET_KEY = 'nurokm67=6qezctkfa-o-g+k$=u$nete3pw)d*q!6j_$g7i#0l' 

# SECURITY WARNING: don't run with debug turned on in production! 
DEBUG = True 
+1

你有哪個版本的Python? –

+0

在您發佈的第一行之上是否有_anything_? – sk1p

+0

爲了讓它更簡單,您可以將settings.py複製到settings.py.tpl中,並從settings.py中刪除所有註釋 – smarber

回答

-1

我得到了同樣的問題,我只是寫:

def__str__(self): 

代替的

def __str__(self): 

解決問題只是在def__str