Wednesday 1 January 2020

Django Learning Part 1

Started learning Django to build web applications.

Install Django in a virtual python environment

Prerequisite: Linux machine with python3 installed.
1) if virtualenv is not already installed, Install it using below command
 
    Let's assume, below is the working directory
    /home/<user_name>/python_learning/django/

    pip3 install virtualenv

2) virtualenv -p /usr/bin/python3 django_env
This creates a virtual environment by name django_env.

3) Activate the virtualenv using below command
    source django_env/bin/activate

4) Install django in the virtual environment which we just created.
 pip3 install django

5) Verify django is installed succesfully
    python -m django --version

   This command shall display the version of the django.

6) django installs command line utility by name "django-admin"

7) Execute below command to create first website
    "django-admin startproject <project_name>

Resources:
https://www.youtube.com/watch?v=UmljXZIypDc&list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p&index=1