Django mastery

Setup steps for pipenv etc

pip install pipenv
pipenv install django
pipenv shell

Then running django

django-admin create project-name

Manage.py

Manage.py is a wrapper around django-admin that takes the project settings

Settings.py


INSTALLED_APPS = [
#admin interface
    "django.contrib.admin",
# authentication
    "django.contrib.auth",
    "django.contrib.contenttypes",
    # one time notifications
    "django.contrib.messages",
    # images etc
    "django.contrib.staticfiles",
    # add all your own apps here as well
    "playground",  # created with python manage.py startapp playground
]

Views in Django (request handler in Django)

setting up django debug

Run the debug version with port 9000

Debug toolbar

Debug toolbar debugging

Had lots of trouble getting the damn toolbarworking… in the end had to edit windows registry as for some reason django was sending javascript as text mimetype