summaryrefslogtreecommitdiff
path: root/docs/howto
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2019-04-19 16:15:38 -0300
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-04-23 09:32:55 +0200
commit25b5eea8cdc69a353bb2d22ea2012b09df6c62e4 (patch)
tree62b693740cca07d6536a784d0fce1c030e0b406f /docs/howto
parent405c8363362063542e9e79beac53c8437d389520 (diff)
Fixed #30387 -- Enhanced docs CLI examples in Unit tests and Install Django on Windows.
Follow up to 37c17846ad6b02c6dca72e8087a279cca04a0c27.
Diffstat (limited to 'docs/howto')
-rw-r--r--docs/howto/windows.txt31
1 files changed, 20 insertions, 11 deletions
diff --git a/docs/howto/windows.txt b/docs/howto/windows.txt
index d624e13bff..9c1705f90a 100644
--- a/docs/howto/windows.txt
+++ b/docs/howto/windows.txt
@@ -2,6 +2,8 @@
How to install Django on Windows
================================
+.. highlight:: doscon
+
This document will guide you through installing Python 3.7 and Django on
Windows. It also provides instructions for installing `virtualenv`_ and
`virtualenvwrapper`_, which make it easier to work on Python projects. This is
@@ -21,13 +23,18 @@ machine. At the time of writing, Python 3.7 is the latest version.
To install Python on your machine go to https://python.org/downloads/. The
website should offer you a download button for the latest Python version.
-Download the executable installer and run it. Check the box next to ``Add
-Python 3.7 to PATH`` and then click ``Install Now``.
+Download the executable installer and run it. Check the boxes next to ``Install
+launcher for all users (recommended)`` and ``Add Python 3.7 to PATH`` then
+click ``Install Now``.
After installation, open the command prompt and check that the Python version
matches the version you installed by executing::
- python --version
+ ...\> py --version
+
+.. seealso::
+
+ For more details, see :doc:`python:using/windows` documentation.
About ``pip``
=============
@@ -42,6 +49,8 @@ get-pip.py`` instructions.
.. _pip: https://pypi.org/project/pip/
+.. _virtualenvwrapper-win:
+
Install ``virtualenv`` and ``virtualenvwrapper``
================================================
@@ -50,17 +59,17 @@ each Django project you create. While not mandatory, this is considered a best
practice and will save you time in the future when you're ready to deploy your
project. Simply type::
- python -m pip install virtualenvwrapper-win
+ ...\> py -m pip install virtualenvwrapper-win
Then create a virtual environment for your project::
- mkvirtualenv myproject
+ ...\> mkvirtualenv myproject
The virtual environment will be activated automatically and you'll see
"(myproject)" next to the command prompt to designate that. If you start a new
command prompt, you'll need to activate the environment again using::
- workon myproject
+ ...\> workon myproject
.. _virtualenv: https://pypi.org/project/virtualenv/
.. _virtualenvwrapper: https://pypi.org/project/virtualenvwrapper-win/
@@ -73,7 +82,7 @@ Django can be installed easily using ``pip`` within your virtual environment.
In the command prompt, ensure your virtual environment is active, and execute
the following command::
- python -m pip install django
+ ...\> py -m pip install Django
This will download and install the latest Django release.
@@ -92,9 +101,9 @@ Common pitfalls
running Python scripts in ``PATH``. This usually occurs when there is more
than one Python version installed.
-* If you are connecting to the internet behind a proxy, there might be problem
- in running the command ``python -m pip install django``. Set the environment
+* If you are connecting to the internet behind a proxy, there might be problems
+ in running the command ``py -m pip install Django``. Set the environment
variables for proxy configuration in the command prompt as follows::
- set http_proxy=http://username:password@proxyserver:proxyport
- set https_proxy=https://username:password@proxyserver:proxyport
+ ...\> set http_proxy=http://username:password@proxyserver:proxyport
+ ...\> set https_proxy=https://username:password@proxyserver:proxyport