Entries tagged with sqlite rss

When django admin won’t start

You've just installed django and set up your first project. You can't get to the admin. Why?

You're using sqlite and didn't create a database file.

$ touch database.db

You're using sqlite and didn't specify the full path to your database file in settings.py.

DATABASE_NAME = '/home/user/projects/mysite/database.db'

You're using sqlite and you didn't give apache sufficient permissions to access the DB or the project directory.

$ cd /home/user/projects/mysite/ $ chgrp www-data . database.db $ chmod g+w . database.db

You forgot to enable admin in settings.py.

INSTALLED_APPS = ( ... 'django.contrib.admin', ... )

You forgot to syncdb after enabling admin.

$ ./manage.py syncdb