I'm trying to install Byteflow in a Django app and when it comes time to run python2.7 manage.py syncdb I'm getting an error. I have it configured to use SQLite so I've not set up any database.

[hittingsmoke@web219 blog]$ python2.7 manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/core/management/_
_init__.py", line 438, in execute_manager
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/core/management/_
_init__.py", line 379, in execute
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/core/management/_
_init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/core/management/_
_init__.py", line 67, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/utils/importlib.p
y", line 35, in import_module
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/core/management/c
ommands/syncdb.py", line 7, in <module>
    from django.core.management.sql import custom_sql_for_model, emit_post_sync_
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/core/management/s
ql.py", line 6, in <module>
    from django.db import models
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/db/__init__.py",
line 14, in <module>
    if not settings.DATABASES:
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/utils/functional.
py", line 276, in __getattr__
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/conf/__init__.py"
, line 42, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/hittingsmoke/webapps/django/lib/python2.7/django/conf/__init__.py"
, line 89, in __init__
    raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s"
% (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'blog.settings' (Is it on sys.path?): No
module named settings

asked 20 Nov '11, 11:08

HittingSmoke's gravatar image

accept rate: 9%

While you can generally follow this guide to fix ImportError tracebacks, when I've tried to reproduce your error I got the following error:

raise ImproperlyConfigured("You haven't set the database ENGINE setting yet.")
django.core.exceptions.ImproperlyConfigured: You haven't set the database ENGINE setting yet.

You should check that your database settings are correct. You can cross-check them against the official documentation page, here.


answered 20 Nov '11, 11:48

iliasr's gravatar image

iliasr ♦♦
accept rate: 33%

edited 20 Nov '11, 12:08

seanf's gravatar image

seanf ♦♦

I'm completely unfamiliar with Django as I was running web2py on my local machine before switching to Webfaction. Would you mind pointing me to the Django settings file where I can verify the database settings?

(20 Nov '11, 12:28) HittingSmoke HittingSmoke's gravatar image

If you are working with the project installed when you setup the django app, the settings.py file will be located here /home/<username>/webapps/django/myproject/settings.py. The database section is usually pretty close to the top of the file.

(20 Nov '11, 13:09) bmeyer71 ♦♦ bmeyer71's gravatar image

Ahh. The database settings for the Byteflow app are in settings_local.py. I have it configured to use SQLite. I was under the impress that SQLite didn't require any configuration other than setting the database type.

I actually did try setting the database to MySQL and Postgresql with correct setting that I'm familiar with and I got the same error.

I have not tried to use the default app yet.

(20 Nov '11, 21:21) HittingSmoke HittingSmoke's gravatar image

Is the settings_local.py imported in your settings.py?

(20 Nov '11, 21:36) neeravk neeravk's gravatar image



answered 17 Dec '13, 02:19

234324's gravatar image

accept rate: 0%



answered 17 Dec '13, 02:20

234324's gravatar image

accept rate: 0%



answered 17 Dec '13, 02:20

234324's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 20 Nov '11, 11:08

Seen: 1,845 times

Last updated: 17 Dec '13, 02:20

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited