django - ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details -


i did heroku specified on https://devcenter.heroku.com/articles/django

but when running heroku run python manage.py syncdb

its saying improperlyconfigured: settings.databases improperly configured. please supply engine value. check settings documentation more details.

this how settings.py file looks like. tried solutions find nothing seems help

django settings django_synapse project.

debug = true template_debug = debug  admins = (     # ('your name', 'your_email@example.com'), )  managers = admins  databases = {     'default': {         'engine': 'django.db.backends.', # add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.         'name': '',                      # or path database file if using sqlite3.         # following settings not used sqlite3:         'user': '',         'password': '',         'host': '',                      # empty localhost through domain sockets or '127.0.0.1' localhost through tcp.         'port': '',                      # set empty string default.     } }  # hosts/domain names valid site; required if debug false # see https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts allowed_hosts = []  # local time zone installation. choices can found here: # http://en.wikipedia.org/wiki/list_of_tz_zones_by_name # although not choices may available on operating systems. # in windows environment must set system time zone. time_zone = 'america/chicago'  # language code installation. choices can found here: # http://www.i18nguy.com/unicode/language-identifiers.html language_code = 'en-us'  site_id = 1  # if set false, django make optimizations not # load internationalization machinery. use_i18n = true  # if set false, django not format dates, numbers , # calendars according current locale. use_l10n = true  # if set false, django not use timezone-aware datetimes. use_tz = true  # absolute filesystem path directory hold user-uploaded files. # example: "/var/www/example.com/media/" media_root = ''  # url handles media served media_root. make sure use # trailing slash. # examples: "http://example.com/media/", "http://media.example.com/" media_url = ''  # absolute path directory static files should collected to. # don't put in directory yourself; store static files # in apps' "static/" subdirectories , in staticfiles_dirs. # example: "/var/www/example.com/static/" static_root = ''  # url prefix static files. # example: "http://example.com/static/", "http://static.example.com/" static_url = '/static/'  # additional locations of static files staticfiles_dirs = (     # put strings here, "/home/html/static" or "c:/www/django/static".     # use forward slashes, on windows.     # don't forget use absolute paths, not relative paths. )  # list of finder classes know how find static files in # various locations. staticfiles_finders = (     'django.contrib.staticfiles.finders.filesystemfinder',     'django.contrib.staticfiles.finders.appdirectoriesfinder', #    'django.contrib.staticfiles.finders.defaultstoragefinder', )  # make unique, , don't share anybody. secret_key = 'h4fm7a&92r1hxa$j&u*7j)61-o2#17k)zy9fncz+7=usn74v%2'  # list of callables know how import templates various sources. template_loaders = (     'django.template.loaders.filesystem.loader',     'django.template.loaders.app_directories.loader', #     'django.template.loaders.eggs.loader', )  middleware_classes = (     'django.middleware.common.commonmiddleware',     'django.contrib.sessions.middleware.sessionmiddleware',     'django.middleware.csrf.csrfviewmiddleware',     'django.contrib.auth.middleware.authenticationmiddleware',     'django.contrib.messages.middleware.messagemiddleware',     # uncomment next line simple clickjacking protection:     # 'django.middleware.clickjacking.xframeoptionsmiddleware', )  root_urlconf = 'django_synapse.urls'  # python dotted path wsgi application used django's runserver. wsgi_application = 'django_synapse.wsgi.application'  template_dirs = (     # put strings here, "/home/html/django_templates" or "c:/www/django/templates".     # use forward slashes, on windows.     # don't forget use absolute paths, not relative paths. )  installed_apps = (     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.sites',     'django.contrib.messages',     'django.contrib.staticfiles',     # uncomment next line enable admin:     # 'django.contrib.admin',     # uncomment next line enable admin documentation:     # 'django.contrib.admindocs', )  # sample logging configuration. tangible logging # performed configuration send email # site admins on every http 500 error when debug=false. # see http://docs.djangoproject.com/en/dev/topics/logging # more details on how customize logging configuration. logging = {     'version': 1,     'disable_existing_loggers': false,     'filters': {         'require_debug_false': {             '()': 'django.utils.log.requiredebugfalse'         }     },     'handlers': {         'mail_admins': {             'level': 'error',             'filters': ['require_debug_false'],             'class': 'django.utils.log.adminemailhandler'         }     },     'loggers': {         'django.request': {             'handlers': ['mail_admins'],             'level': 'error',             'propagate': true,         },     } }  # parse database configuration $database_url import dj_database_url databases['default'] =  dj_database_url.config()  # honor 'x-forwarded-proto' header request.is_secure() secure_proxy_ssl_header = ('http_x_forwarded_proto', 'https')  # allow host headers allowed_hosts = ['*']  # static asset configuration import os base_dir = os.path.dirname(os.path.abspath(__file__)) static_root = 'staticfiles' static_url = '/static/'  staticfiles_dirs = (     os.path.join(base_dir, 'static'), ) 

did try stuff in documentation @ https://devcenter.heroku.com/articles/django#django-settings?

import dj_database_url databases['default'] =  dj_database_url.config() 

it says

django settings

next, configure application heroku environment, including heroku’s postgres database. the dj-database-url module parse values of database_url environment variable , convert them django can understand.

make sure ‘dj-database-url’ in requirements file, add following bottom of settings.py file:

settings.py

# parse database configuration $database_url import dj_database_url databases['default'] =  dj_database_url.config()  # honor 'x-forwarded-proto' header request.is_secure() secure_proxy_ssl_header = ('http_x_forwarded_proto', 'https')  # allow host headers allowed_hosts = ['*']  # static asset configuration import os base_dir = os.path.dirname(os.path.abspath(__file__)) static_root = 'staticfiles' static_url = '/static/'  staticfiles_dirs = (     os.path.join(base_dir, 'static'), ) 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -