Menu

Steps to install Django

If you’ve just started with the Python web development framework Django, there is a chance you might forget the steps involved in creating your project, setting up a virtual environment and running your web server.

That is understandable. It takes time to master all the steps.

In this post, I assume you’re a newcomer to the Django world. You must check out the official Django website. They have the official documentation covering all that you need to work with Django.

Step #1.

Make a directory for the django project

Step #2

Install 'pipenv' in the system environment if not already

Step #3.

Create a virtual environment by running 'pipenv shell' (the location of the venv defaults to '~/user/.virtualenv/', to make it live inside the current directory, make an empty folder named '.venv', pipenv automatically detects that folder and creates the virtual environment inside that folder)

Step #4.

Now install django by running 'pipenv install django' (installs the latest version)

Step #5.

Start the project by running 'django-admin startproject $NAME_OF_THE_PROJECT' 

Step #6.

To start the live server cd into the project and run 'python manage.py runserver port(optional)'

Step #7.

To make a new app inside that project run 'python manage.py startapp $NAME_OF_THE_APP'
wanikwai
wanikwai

A christian & dad to Mireya and Jnr. I write occasionally about technology on this website.

Articles: 26

Share your thoughts

Discover more from Watson Anikwai

Subscribe now to keep reading and get access to the full archive.

Continue reading