Skip to content

hackersandslackers/django-views-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e7f7b7a · Jan 15, 2024
Jan 14, 2024
Jan 15, 2024
Jan 14, 2024
Jan 14, 2024
Jan 15, 2024
Jan 14, 2024
Jan 15, 2024
Jan 14, 2024
Jan 13, 2024
Jan 13, 2024
Jan 13, 2024
Jan 13, 2024
Jan 14, 2024
Jan 13, 2024
Jan 15, 2024
Jan 14, 2024
Aug 15, 2020
Jan 15, 2024

Repository files navigation

Django Views Tutorial

Python Django MySQLClient GitHub Last Commit GitHub Issues GitHub Stars GitHub Forks

Django Intro Tutorial

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

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

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.