Installing Django

Django 2 is hosted in Python Package Index (PyPI), so use pip to install it. It can also be downloaded and installed manually. Using pip to install Django will also install the required dependency, pytz. Django will be downloaded from PyPI as a wheel and installed. 

Because Django 2 is a major update which has been recently released, we have to ensure that pip installs the correct version. With this command, we will install Django 2.0:

C:Python36Scripts>pip install Django==2.0

The module will be installed, along with the supporting modules:

Django 2.0 is used in this chapter. Use the latest version of Django 2 available to start a project. Check out Django 2.0 documentation (as well as other Django versions) here: 
https://www.djangoproject.com/.

If you are using virtual environments, you can specify a specific version of Django for each environment. If not, and you have multiple versions of Python installed, be sure to use the correct pip version to install Django within the Python 3 folder structure. 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset