Skip to content

Commit 8497db1

Browse files
tim-schillingmatthiask
authored andcommitted
Improve the database developer comments and documentation. (#1230)
1 parent 9ddf49d commit 8497db1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

example/README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ Before running the example for the first time, you must create a database::
2727
Then you can use the following command to run the example::
2828

2929
$ python -m django runserver --settings=example.settings
30+
31+
You can change the database used by specifying the ``DJANGO_DATABASE_ENGINE``
32+
environment variable::
33+
34+
$ DJANGO_DATABASE_ENGINE=postgresql python -m django migrate --settings=example.settings
35+
$ DJANGO_DATABASE_ENGINE=postgresql python -m django runserver --settings=example.settings
36+

example/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
if os.environ.get("DJANGO_DATABASE_ENGINE", "").lower() == "mysql":
8787
# % mysql
8888
# mysql> CREATE DATABASE debug_toolbar;
89+
# mysql> CREATE USER 'debug_toolbar'@'localhost';
8990
# mysql> GRANT ALL PRIVILEGES ON debug_toolbar.* TO 'debug_toolbar'@'localhost';
9091
DATABASES = {
9192
"default": {

0 commit comments

Comments
 (0)