Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.15 KB

File metadata and controls

48 lines (35 loc) · 1.15 KB

Section 02: Installation for Backend

Python and Virtual Environment

There are multiple ways how we can have virtual environments and one of the easiest way is pipenv. It creates a new file Pipfile which contains information for the dependencies of the project, and supersedes the requirements.txt file used in most Python projects.

# install the pipenv
$ pip install pipenv

# create a virtual environment for project
$ pipenv shell

# install packages
$ pipenv install Django==3.0.8


Setup The Django

# create new django project
$ django-admin startproject ecom

# move anything that we have created into the database
$ python manage.py makemigrations
$ python manage.py migrate

# create the super user
$ python manage.py createsuperuser

# run the server
$ python manage.py runserver