mirror of https://github.com/django/django.git
Refs #31626 -- Noted that Daphne provides a runserver command.
This commit is contained in:
parent
e846c5e724
commit
279e611c01
|
@ -33,3 +33,22 @@ For a typical Django project, invoking Daphne would look like:
|
||||||
This will start one process listening on ``127.0.0.1:8000``. It requires that
|
This will start one process listening on ``127.0.0.1:8000``. It requires that
|
||||||
your project be on the Python path; to ensure that run this command from the
|
your project be on the Python path; to ensure that run this command from the
|
||||||
same directory as your ``manage.py`` file.
|
same directory as your ``manage.py`` file.
|
||||||
|
|
||||||
|
.. _daphne-runserver:
|
||||||
|
|
||||||
|
Integration with ``runserver``
|
||||||
|
==============================
|
||||||
|
|
||||||
|
Daphne provides a :djadmin:`runserver` command to serve your site under ASGI
|
||||||
|
during development.
|
||||||
|
|
||||||
|
This can be enabled by adding ``daphne`` to the start of your
|
||||||
|
:setting:`INSTALLED_APPS` and adding an ``ASGI_APPLICATION`` setting pointing
|
||||||
|
to your ASGI application object::
|
||||||
|
|
||||||
|
INSTALLED_APPS = [
|
||||||
|
"daphne",
|
||||||
|
...,
|
||||||
|
]
|
||||||
|
|
||||||
|
ASGI_APPLICATION = "myproject.asgi.application"
|
||||||
|
|
|
@ -1013,6 +1013,13 @@ By default, the development server doesn't serve any static files for your site
|
||||||
you want to configure Django to serve static media, read
|
you want to configure Django to serve static media, read
|
||||||
:doc:`/howto/static-files/index`.
|
:doc:`/howto/static-files/index`.
|
||||||
|
|
||||||
|
Serving with ASGI in development
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Django's ``runserver`` command provides a WSGI server. In order to run under
|
||||||
|
ASGI you will need to use an :doc:`ASGI server </howto/deployment/asgi/index>`.
|
||||||
|
The Django Daphne project provides :ref:`daphne-runserver` that you can use.
|
||||||
|
|
||||||
``sendtestemail``
|
``sendtestemail``
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue