April 2

Django setup

In your python virtual env, install django 3.1.5 (or later version)

$ pip install django==3.1.5

Check virtual env using pip

$ pip freeze

Run django-admin to create your django project

$ django-admin startproject myproject_name

Run your first django project, and you should be able to view your django project on

$ python manage.py runserver

To migrate your database with django, run 

$ python manage.py migrate

Common commands for manage.py

$ python manage.py startapp  {app_name}   # create a new 'app' in the project
$ python manage.py runserver                           # start server
$ python manage.py runserver 7000                 # start server with custom port
$ python manage.py makemigrations              # whenever you make changes to model
$ python manage.py migrate                              # migrate model to DB
$ python manage.py shell                                    # run django shell commands
$python manage.py createsuperuser               # create your app super user

note for additional packages: 

$ pip install django==3.1.5
$ pip install mysql-connector-python 
$ pip install django-environ  

Send us a message. We will reply as soon as we can.