mirror of
https://github.com/django/django.git
synced 2025-12-23 09:19:27 +00:00
Fixed #36781 -- Added Granian to deployment documentation.
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Linters / zizmor (push) Waiting to run
Tests / Windows, SQLite, Python 3.14 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Linters / zizmor (push) Waiting to run
Tests / Windows, SQLite, Python 3.14 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
This commit is contained in:
parent
b172cbdf33
commit
60fecd1d44
5 changed files with 77 additions and 0 deletions
37
docs/howto/deployment/asgi/granian.txt
Normal file
37
docs/howto/deployment/asgi/granian.txt
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
==============================
|
||||
How to use Django with Granian
|
||||
==============================
|
||||
|
||||
Granian_ is a Rust-based high-performance HTTP server for Python applications,
|
||||
supporting ASGI and WSGI interfaces.
|
||||
|
||||
.. _Granian: https://github.com/emmett-framework/granian
|
||||
|
||||
Installing Granian
|
||||
==================
|
||||
|
||||
You can install Granian with ``pip``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
python -m pip install granian
|
||||
|
||||
Running Django in Granian
|
||||
=========================
|
||||
|
||||
When Granian is installed, a ``granian`` command is available which runs ASGI
|
||||
applications. Granian needs to be called with the location of a module
|
||||
containing an ASGI application object, followed by what the application is
|
||||
called (separated by a colon), using the ``--interface asgi`` option.
|
||||
|
||||
For a typical Django project, invoking Granian would look like:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
granian myproject.asgi:application --interface asgi
|
||||
|
||||
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
|
||||
same directory as your ``manage.py`` file.
|
||||
|
||||
For more advanced usage, please read the `Granian documentation <Granian_>`_.
|
||||
|
|
@ -17,6 +17,7 @@ Django includes getting-started documentation for the following ASGI servers:
|
|||
:maxdepth: 1
|
||||
|
||||
daphne
|
||||
granian
|
||||
hypercorn
|
||||
uvicorn
|
||||
|
||||
|
|
|
|||
37
docs/howto/deployment/wsgi/granian.txt
Normal file
37
docs/howto/deployment/wsgi/granian.txt
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
==============================
|
||||
How to use Django with Granian
|
||||
==============================
|
||||
|
||||
Granian_ is a Rust-based high-performance HTTP server for Python applications,
|
||||
supporting ASGI and WSGI interfaces.
|
||||
|
||||
.. _Granian: https://github.com/emmett-framework/granian
|
||||
|
||||
Installing Granian
|
||||
==================
|
||||
|
||||
You can install Granian with ``pip``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
python -m pip install granian
|
||||
|
||||
Running Django in Granian
|
||||
=========================
|
||||
|
||||
When Granian is installed, a ``granian`` command is available which runs WSGI
|
||||
applications. Granian needs to be called with the location of a module
|
||||
containing a WSGI application object named ``application``, using the
|
||||
``--interface wsgi`` option.
|
||||
|
||||
For a typical Django project, invoking Granian would look like:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
granian myproject.wsgi:application --interface wsgi
|
||||
|
||||
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
|
||||
same directory as your ``manage.py`` file.
|
||||
|
||||
For more advanced usage, please read the `Granian documentation <Granian_>`_.
|
||||
|
|
@ -16,6 +16,7 @@ Django includes getting-started documentation for the following WSGI servers:
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
granian
|
||||
gunicorn
|
||||
uwsgi
|
||||
modwsgi
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ gis
|
|||
GiST
|
||||
Googol
|
||||
Greenhill
|
||||
Granian
|
||||
gunicorn
|
||||
GZip
|
||||
gzipped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue