I already change the settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'examdatabase',
'USER': 'examdatabaseuser',
'PASSWORD': '11111',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
and I also install postgresql and database:
sudo apt-get install python-psycopg2
sudo apt-get install postgresql
sudo su - postgres
createuser --superuser examdatabaseuser
psql
\password examdatabaseuser
createdb examdatabase
And I delete the sqlite database file in my project, but when I python manage.py runserver
it still use sqlite. Why?
Related info: I use virtualenv (/home/py3env). Ubuntu Server 14.04 LTS.
Aucun commentaire:
Enregistrer un commentaire