/django-views-tutorial

:rocket: :white_check_mark: Building Django Web-Apps with Function-based and Class-based Views

Primary LanguageJavaScriptMIT LicenseMIT

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.