I’m reading a tutorial on how to build a web application with Django. So far, I have installed Django and it seems to work find.
The tutorial asked to create project folders by typing (in Windows command prompt):
django-admin.py startproject django_bookmarks
The folders and files were created successfully. See below:
django_bookmarks/
__init__.py
manage.py
settings.py
urls.py
Then it says we can work with SQLite3 for now (later when we deploy we will need larger
database engine such as MySQL.
Then I had to setup the database in engine by running settings.py.
and make sure codes are written as follow:
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'bookmarksdb'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
I made the changes above.
Here comes the bad stuff. I need to create database tables that the application will run
with by typing (in Windows command prompt):
python manage.py syncdb
then I get an error message saying the following:
"load_backend raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured:'sqlite3 isn't an available database
backend.
Try using django.db.backends.sqlite3 instead.
Error was: No module named base"
Now, how can I setup those needed sqlite3 database tables?
Any help will do, thanks!
The database engine needs to be set to django.db.backends.sqlite3
More recent versions of Django (post 1.3) require this to be fully specified. If you’re following a book or guide it may refer to an older Django version.