Skip to content

400 Software Development


DjangoΒΆ

Django is a python based framework for web app development.

Install Django

python3 -m pip install Django

Setting up a project:

django-admin startproject project-name

Starting the dev server:

python3 manage.py runserver

Create an app:

python3 manage.py startapp app-name

Migrate models to the database:

python3 manage.py makemigrations 
python3 manage.py migrate

Databases: - You can set up postgresql database server or a mysql server - Connect the database to the project by making a change to settings.py - reset django postgres database - custom django user model - Making database queries

Environment variables: - django-environ

Django Views: Views take in an HttpRequest as a parament and return an HttpResponse. The HttpRequest can contain GET and POST data that can be used when constructing the view or responding to the request.

Django code: - django shortcuts - Django path function - Django generic views

Deployment: - Deploying an app to production

Django Rest Framework: - https://www.django-rest-framework.org/tutorial/quickstart/ - cdrf.co

Authentication: - Django AllAuth - Google OAuth provider - https://learndjango.com/tutorials/django-login-and-logout-tutorial - https://learndjango.com/tutorials/django-signup-tutorial - https://ordinarycoders.com/blog/article/django-password-reset