Build an eCommerce website with Python + Django

Manpreet Singh
3 min readJun 21, 2021

Welcome back! Python is an awesome programming language used for tons of different things, including web development, so let’s build out a sample website with Python! This specific project uses the Django framework, we are going to be doing a high-level overview of a pre-existing project hosted on GitHub (please give full credit to the originator of the code):

Let’s go ahead and look over the code!

The Code

Starting off, the code is broken down into seven different files, an ecom folder, a static folder, a templates folder, a readme file, the file, and a requirements text file:

Within the ecom folder we have several different python files (and a .env file):

Within the static folder we have several different assets for our website:

Within the templates folder we have our HTML files which are essentially the base of this project:

Finally, our file is essentially a command-line administrator tool for us. That’s essentially all of the code we need to walk through, let’s run this code!

Running The Code

Starting off, we want to make sure that we have all of the files in the requirement text file installed, so start off by installing these packages: