mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
[3.1.x] Fixed #31643 -- Changed virtualenv doc references to Python 3 venv.
Backport of 9f4ceee90a
from master
This commit is contained in:
parent
fe07357ef9
commit
d7ee69d2f2
8 changed files with 33 additions and 39 deletions
|
@ -48,9 +48,9 @@ your project package (``mysite`` in this example). This tells Apache to serve
|
|||
any request below the given URL using the WSGI application defined in that
|
||||
file.
|
||||
|
||||
If you install your project's Python dependencies inside a `virtualenv`_, add
|
||||
the path to the virtualenv using ``WSGIPythonHome``. See the `mod_wsgi
|
||||
virtualenv guide`_ for more details.
|
||||
If you install your project's Python dependencies inside a :mod:`virtual
|
||||
environment <venv>`, add the path using ``WSGIPythonHome``. See the `mod_wsgi
|
||||
virtual environment guide`_ for more details.
|
||||
|
||||
The ``WSGIPythonPath`` line ensures that your project package is available for
|
||||
import on the Python path; in other words, that ``import mysite`` works.
|
||||
|
@ -64,8 +64,7 @@ for you; otherwise, you'll need to create it. See the :doc:`WSGI overview
|
|||
documentation</howto/deployment/wsgi/index>` for the default contents you
|
||||
should put in this file, and what else you can add to it.
|
||||
|
||||
.. _virtualenv: https://virtualenv.pypa.io/
|
||||
.. _mod_wsgi virtualenv guide: https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
|
||||
.. _mod_wsgi virtual environment guide: https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ Here's an example command to start a uWSGI server::
|
|||
--harakiri=20 \ # respawn processes taking more than 20 seconds
|
||||
--max-requests=5000 \ # respawn processes after serving 5000 requests
|
||||
--vacuum \ # clear environment on exit
|
||||
--home=/path/to/virtual/env \ # optional path to a virtualenv
|
||||
--home=/path/to/virtual/env \ # optional path to a virtual environment
|
||||
--daemonize=/var/log/uwsgi/yourproject.log # background the process
|
||||
|
||||
This assumes you have a top-level project package named ``mysite``, and
|
||||
|
@ -78,7 +78,7 @@ The Django-specific options here are:
|
|||
* ``module``: The WSGI module to use -- probably the ``mysite.wsgi`` module
|
||||
that :djadmin:`startproject` creates.
|
||||
* ``env``: Should probably contain at least :envvar:`DJANGO_SETTINGS_MODULE`.
|
||||
* ``home``: Optional path to your project virtualenv.
|
||||
* ``home``: Optional path to your project virtual environment.
|
||||
|
||||
Example ini configuration file::
|
||||
|
||||
|
|
|
@ -87,8 +87,9 @@ Installation
|
|||
============
|
||||
|
||||
Once you're ready, it is time to :doc:`install the new Django version
|
||||
</topics/install>`. If you are using virtualenv_ and it is a major upgrade, you
|
||||
might want to set up a new environment with all the dependencies first.
|
||||
</topics/install>`. If you are using a :mod:`virtual environment <venv>` and it
|
||||
is a major upgrade, you might want to set up a new environment with all the
|
||||
dependencies first.
|
||||
|
||||
If you installed Django with pip_, you can use the ``--upgrade`` or ``-U`` flag:
|
||||
|
||||
|
@ -97,7 +98,6 @@ If you installed Django with pip_, you can use the ``--upgrade`` or ``-U`` flag:
|
|||
$ python -m pip install -U Django
|
||||
|
||||
.. _pip: https://pip.pypa.io/
|
||||
.. _virtualenv: https://virtualenv.pypa.io/
|
||||
|
||||
Testing
|
||||
=======
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue