0

I'm writing a new django project on 1.6 version but when I go to sync the database the settings.py returns this error:

 mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module __import__(name) File "/home/yabir/Documentos/python/project_vine/vine/vine/settings.py", line 29 ALLOWED_HOSTS = [] ^ SyntaxError: invalid syntax 

my settings.py before the error

import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '*******************' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates') ALLOWED_HOSTS = [] 
1
  • 1
    Can you copy your settings file, specificly the lines before that statement? Most likely you're opening something and forgetting to close it. Commented Nov 30, 2013 at 12:01

2 Answers 2

3

You have an erronous parenthesis on the previous line. It should be:

TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates'), ) 
Sign up to request clarification or add additional context in comments.

Comments

3

Ah you forgot to close TEMPLATE_DIRS. Change it to:

TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates'), ) ALLOWED_HOSTS = [] 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.