1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
README
======
About
-----
This sample project demonstrates how to use the debug toolbar. It is designed
to run under the latest stable version of Django.
It also provides a few test pages to ensure the debug toolbar doesn't
interfere with common JavaScript frameworks.
How to
------
The example project requires a working installation of Django and a few other
packages::
$ python -m pip install -r requirements_dev.txt
The following command must run from the root directory of Django Debug Toolbar,
i.e. the directory that contains ``example/``::
$ make example
This will create a database, superuser, and run the Django development server.
The superuser's username will be the same as the current OS user and the
password is "p".
If you'd like to run these steps individually, use the following commands.
Again, run from the root directory of Django Debug Toolbar.
Create a database::
$ python example/manage.py migrate
Create a superuser::
$ python example/manage.py createsuperuser
Run the Django development server::
$ python example/manage.py runserver
You can change the database used by specifying the ``DB_BACKEND``
environment variable::
$ DB_BACKEND=postgresql python example/manage.py migrate
$ DB_BACKEND=postgresql python example/manage.py runserver
Using an asynchronous (ASGI) server:
Install [Daphne](https://pypi.org/project/daphne/) first:
$ python -m pip install daphne
Then run the Django development server:
$ ASYNC_SERVER=true python example/manage.py runserver
|