Skip to main content

setting up

Let’s configure our systems for developing Django applications. Let's go step by step:-
  • As we know that Django is the framework written in python, so to develop applications in it we need to first have python installed. I would be installing python 3.7 as this one lasted there will be a newer version in future.
  • By this step, we assure that you have installed python3.7 successfully in your systems. Now open a terminal and create a directory named as demo project at your preferred location.
  • Now go inside demoProject and create a virtual environment for this project.
  • Python3.7 -m venv venv
  • Above command uses the venv module of python3.7, creates a venv directory and install python3.7 in that venv directory.
  • Now next step is to activate this virtual environment.
    • For Linux/mac os users:
      • source venv/bin/activate
    • For Windows users
      • ./venv/lib/activate
  • Now next step is to install django-admin in this virtualenv so that we can create our Django project.
  • pip install django
  • now to create Django project use following command
    • django-admin startproject demoProject
  • now to start this project run command
      • cd demoProject
      • python manage.py runserver
  • Now open your browser and go to localhost:8000.
  • On successful installation, you will see this screen.


Comments