python - How to resolve the following error in Django(1.4.2) -


am getting following error:

traceback (most recent call last): file "manage.py", line 11, in <module> execute_manager(settings) file "c:\users\blue\anaconda\lib\site-packages\django\core\management\__init__.py", line 459, in execute_manager utility.execute() file "c:\users\blue\anaconda\lib\site-packages\django\core\management\__init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) file "c:\users\blue\anaconda\lib\site-packages\django\core\management\base.py", line 196, in run_from_argv self.execute(*args, **options.__dict__) file "c:\users\blue\anaconda\lib\site-packages\django\core\management\base.py", line 232, in execute output = self.handle(*args, **options) file "c:\users\blue\anaconda\lib\site-packages\django\core\management\base.py", line 371, in handle return self.handle_noargs(**options) file "c:\users\blue\anaconda\lib\site-packages\django\core\management\commands\syncdb.py", line 57, in handle_noargs cursor = connection.cursor() file "c:\users\blue\anaconda\lib\site-packages\django\db\backends\dummy\base.py", line 15, in complain raise improperlyconfigured("settings.databases improperly configured. " django.core.exceptions.improperlyconfigured: settings.databases improperly configured. please supply engine value. check settings documentation more details. 

following settings.py:- # django settings ecomstore project.

import os base_dir = os.path.dirname(os.path.dirname(__file__)) debug = true template_debug = debug  admins = (     # ('your name', 'your_email@domain.com'), )  site_name = 'modern musician' meta_keywords = 'music, instruments, sheet music, musician' meta_description = 'modern musician online supplier of instruments, sheet music, , other accessories musicians'  # current_path = os.path.abspath('.').decode('utf-8').replace('\\','/') current_path = os.path.abspath(os.path.dirname(__file__).decode('utf-8'))  # upon deployment, change true enable_ssl = false  # uncomment following line after have installed memcached on local development machine #cache_backend = 'memcached://127.0.0.1:11211/'  managers = admins  database_engine = 'django.db.backends.mysql'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. database_name =os.path.join(base_dir, 'db.mysql'),              # or path database file if using sqlite3. database_user = 'root'             # not used sqlite3. database_password = ''         # not used sqlite3. database_host = ''             # set empty string localhost. not used sqlite3. database_port = ''             # set empty string default. not used sqlite3.  # 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. # if running in windows environment must set same # system time zone. time_zone = 'america/los_angeles'  # language code installation. choices can found here: # http://www.i18nguy.com/unicode/language-identifiers.html language_code = 'en-us'  site_id = 1  cache_timeout = 60 * 60   products_per_page = 1 products_per_row = 4  login_redirect_url = '/accounts/my_account/'  session_cookie_days = 90 session_cookie_age = 60 * 60 * 24 * session_cookie_days   # if set false, django make optimizations not # load internationalization machinery. use_i18n = false  # absolute path directory holds media. # example: "/home/media/media.lawrence.com/" media_root = os.path.join(current_path, 'static')  # url handles media served media_root. make sure use # trailing slash if there path component (optional in other cases). # examples: "http://media.lawrence.com", "http://example.com/media/" media_url = '/static/'  # url prefix admin media -- css, javascript , images. make sure use # trailing slash. # examples: "http://foo.com/media/", "/media/". admin_media_prefix = '/static/admin_media/'  # make unique, , don't share anybody. secret_key = 'io_)m-ijh_g#cz-k1p3=tzazb6v3d)h_u8b9cvex9yn%zbakmn'  # list of callables know how import templates various sources. template_loaders = (     'django.template.loaders.filesystem.load_template_source',     'django.template.loaders.app_directories.load_template_source', #     'django.template.loaders.eggs.load_template_source', )  template_context_processors = (     'django.core.context_processors.auth',     'django.core.context_processors.debug',     'django.core.context_processors.i18n',     'django.core.context_processors.media',     'ecomstore.utils.context_processors.ecomstore', )  middleware_classes = (     'django.middleware.common.commonmiddleware',     'django.contrib.sessions.middleware.sessionmiddleware',     'django.contrib.auth.middleware.authenticationmiddleware',     'django.contrib.csrf.middleware.csrfmiddleware',     'django.contrib.flatpages.middleware.flatpagefallbackmiddleware',     'djangodblog.dblogmiddleware',     'ecomstore.marketing.urlcanon.urlcanonicalizationmiddleware',     'ecomstore.sslmiddleware.sslredirect',     'django.contrib.redirects.middleware.redirectfallbackmiddleware', )  auth_profile_module = 'accounts.userprofile'  root_urlconf = 'ecomstore.urls'  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.     os.path.join(current_path, 'templates'), )  installed_apps = (     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.sites',     'django.contrib.admin',     'django.contrib.flatpages',     'ecomstore.catalog',     'ecomstore.cart',     'ecomstore.accounts',     'ecomstore.search',     'ecomstore.checkout',     'ecomstore.utils',     'ecomstore.stats',     'djangodblog',     'tagging',     'django.contrib.sitemaps',     'django.contrib.redirects',     'ecomstore.billing',     'ecomstore.caching', ) # use url canonicalization middleware: # canonical hostname used app (required) canon_url_host = 'www.your-domain.com' # these hostnames redirected canon_url_hostname  # (optional; if not provided, non-matching redirected) canon_urls_to_rewrite = ['your-domain.com', 'other-domain.com']  # google checkout api credentials google_checkout_merchant_id = '' google_checkout_merchant_key = '' google_checkout_url = 'https://sandbox.google.com/checkout/api/checkout/v2/merchantcheckout/merchant/' + google_checkout_merchant_id  # authorize.net api credentials authnet_post_url = 'test.authorize.net' authnet_post_path = '/gateway/transact.dll' authnet_login = '' authnet_key = ''  # google analytics tracking id # should take form of 'ua-xxxxxxx-x', x's digits analytics_tracking_id = ''  try:     settings_local import * except importerror:     pass 

i using django-1.4.2 , mysql.please resolve error tomorrow have project submission.

databases option not configured in settings.py

add this,

databases = {     'default': {         'engine': 'django.db.backends.mysql',         'options': {             'read_default_file': '/path/to/my.cnf',         },     } } 

more information @ https://docs.djangoproject.com/en/1.4/ref/settings/


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -