This is my input and output error message (the whole thing) :

CaiGengYangs-MacBook-Pro:~ CaiGengYang$ cd mysite folder 

CaiGengYangs-MacBook-Pro:mysite CaiGengYang$ ls 

manage.py        mysite 

CaiGengYangs-MacBook-Pro:mysite CaiGengYang$ python manage.py migrate 

Traceback (most recent call last): 

  File "manage.py", line 10, in <module> 

    execute_from_command_line(sys.argv) 

  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
 line 338, in execute_from_command_line 

    utility.execute() 

  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
 line 303, in execute 

    settings.INSTALLED_APPS 

  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/__init__.py",
 line 48, in __getattr__ 

    self._setup(name) 

  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/__init__.py",
 line 44, in _setup 

    self._wrapped = Settings(settings_module) 

  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/__init__.py",
 line 92, in __init__ 

    mod = importlib.import_module(self.SETTINGS_MODULE) 

  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
 line 37, in import_module 

    __import__(name) 

  File "/Users/CaiGengYang/mysite/mysite/settings.py", line 45 

    'django.middleware.csrf.CsrfViewMiddleware', 

                                              ^ 

SyntaxError: invalid syntax 

CaiGengYangs-MacBook-Pro:mysite CaiGengYang$ 





On Monday, September 28, 2015 at 8:10:26 AM UTC+8, Steven D'Aprano wrote:
> On Mon, 28 Sep 2015 03:45 am, Cai Gengyang wrote:
> 
> > http://pastebin.com/RWt1mp7F --- If anybody can find any errors with this
> > settings.py file, let me know !
> > 
> > Can't seem to find anything wrong with it ...
> 
> Perhaps there is nothing wrong with it. What makes you think that there is?
> 
> Do you get an exception? If so, the exception will tell you where to start:
> read the error message, look at the line it says the error occurred at, and
> fix the problem.
> 
> If you need help, COPY and PASTE the *entire* traceback, starting from the
> line "Traceback (most recent call last)" to the error message at the end,
> and send it to us.
> 
> 
> 
> -- 
> Steven
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to