Explain database configuration in README.rst

This commit is contained in:
Benjamin ABEL 2014-10-30 16:24:16 +01:00
parent 08d6cbad6f
commit 16988aa187
2 changed files with 11 additions and 1 deletions

View File

@ -30,6 +30,7 @@ Sławek Ehlert / @slafs
Alberto Sanchez / @alb3rto
Eyad Al Sibai / @eyadsibai
Chris Franklin
Benjamin Abel
* Possesses commit rights

View File

@ -107,7 +107,16 @@ First make sure to create and activate a virtualenv_, then open a terminal at th
.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/
You can now run the usual Django ``runserver`` command (replace ``yourapp`` with the name of the directory containing the Django project)::
Then, create a PostgreSQL database and add the database configuration using the ``dj-database-url`` app pattern: ``postgres://db_owner:password@dbserver_ip:port/db_name`` either:
* in the ``config.common.py`` setting file,
* or in the env variable ``DATABASE_URL``
You can now run the usual Django ``migrate`` and ``runserver`` command (replace ``yourapp`` with the name of the directory containing the Django project)::
$ python yourapp/manage.py migrate
$ python yourapp/manage.py runserver