Part of the Free Full-stack course: https://www.youtube.com/playlist?list=PL6yRaaP0WPkXo7Kl6LQcO69bsYTS7BDxo

Welcome to the Free Full-stack Course

In this course, we will be using Python as the programming language for our backend to deliver REST APIs. The REST APIs will be developed on top of Django which is a backend/website framework that sits on top of Python. And we will also use DRF (Django REST Framework) to actually deliver our APIs on top of Django.

In this chapter we are going to set up our Django backend project. We will first create a GitHub repository in which we will store all of our backend code not only in this chapter, but also in all coming chapters where we work on our server. We will then create a virtual environment with PyEnv with the correct version of Python and install Django. After that we connect our Django installation to PostgreSQL and apply our migrations.

Timestamps:
00:00 - Django Backend Setup
00:32 - Create a GitHub repository
04:35 - Clone the GitHub repository locally
06:43 - Set your local python version
08:51 - We need a virtual machine
11:08 - Create a virtual machine
12:42 - Your virtualenv is in Python versions now
13:33 - Activate your virtualenv
15:31 - Deactivating a virtualenv
16:12 - Ensure to always activate your virtualenv
17:55 - Install Django
18:15 - Upgrade pip if you are prompted to do so
18:50 - Install Black code formatter
19:45 - Create your Django project
22:02 - Test run your server
23:08 - Stop the server and open your code editor
24:31 - Activate virtualenv in your code editor
25:40 - Open manage.py and select interpreter
27:42 - Don't install MyPy as a linter
28:12 - Formatting provider in Workspace Settings (JSON)
28:47 - Enable format on save in Workspace Settings (JSON)
29:25 - Install psycopg2 as PostgreSQL database adapter
30:23 - Open settings.py and change "ENGINE"
32:10 - Log into psql
32:54 - Set your password
34:57 - Quit psql
35:08 - Set the name of your database in settings.py
35:55 - Set the username/role in settings.py
36:33 - Set the password in settings.py
36:50 - Set the host in settings.py
36:59 - Set the port in settings.py
37:14 - Prepare your migrations
40:41 - Apply your migrations
41:18 - Double check tables in psql
42:37 - Commit and push your code
43:52 - Congratulations

If you want to support my work, please consider joining my YouTube channel by pressing the Join button!

Twitter: https://twitter.com/vandadnp
LinkedIn: https://linkedin.com/in/vandadnp

Let's get started!