This repository contains source code for accompanying tutorial: https://hackersandslackers.com/creating-django-views/
A working demo of this source code is hosted here: https://django.hackersandslackers.app/
Installation via requirements.txt
:
$ git clone https://github.com/hackersandslackers/django-views-tutorial.git
$ cd django-views-tutorial
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip3 install -r requirements.txt
$ python3 manage.py runserver
Configuration is handled by creating a django_views_tutorial/.env file (see .env.example for reference) Replace values with your own:
DEBUG=True
SECRET_KEY="yoursecretkey"
DJANGO_SETTINGS_MODULE="django_views_tutorial.settings"
DATABASE_ENGINE=django.db.backends.mysql
DATABASE_NAME=databasename
DATABASE_USER=username
DATABASE_PASSWORD=password
DATABASE_HOST=0.0.0.0
DATABASE_PORT=1234
DATABASE_CERTIFICATE="../creds/ca-certificate.crt" # (optional)
Hackers and Slackers tutorials are free of charge. If you found this tutorial helpful, a small donation would be greatly appreciated to keep us in business. All proceeds go towards coffees], and all coffee goes towards more content.