Setup Django Environment in Windows

Setup Django Environment in Windows

This blogpost covers the requirements and steps required to setup a Django environment on windows.

  1. How do you install python?
    1. Download python from https://www.python.org/downloads/ and install.
  2. Verify Installation?
    1. Command: python -V
    2. Command: pip -V ( pip comes by default with python)
    3. Command: virtualenv –version (pip install virtualenv)
    4. Command: virtualenvwrapper (pip install virtualenvwrapper)
  3. What are virtualenv & virtualenvwrapper?
    1. Virtualenv is used to create isolated python environments.
    2. Virtualenvwrapper is an extension to virtualenv. It makes easy to create and manage multiple virtual environments.
  4. In a Django web application, what is the difference between project and app?
    1. Project: Entire application and its parts (Website)
    2. App: Submodule of the application. Self-Contained and not intertwined with other apps.
  5. How do you create a virtual environment and install django?
    1. Create a folder for python app.
    2. Create virtual environment in the folder: python -m venv timesheetappenv
    3. Start your virtual environment: timesheetappenv\Scripts\activate
    4. Upgrade pip in virtual environment: pip install –upgrade pip
    5. Install django in your virtual environment: pip install Django==2.0.2
    6. Screenshot
  6. How do you create django project?
    1. Command: django-admin.py startproject timesheetsite
  7. Verify your project?
    1. Go to project folder
    2. Command: python manage.py runserver
    3. Screenshots:

Leave a Comment