Save Time Setting Up Django 5

Published: 14 December 2023
on channel: Good and Geeky
281
4

You can subscribe here
Good and Geeky Channel - https://goodandgeeky.com/Youtube

Subscribe to make sure you hear about all the Good and Geeky / Wizardgold videos. I love my technology - Nissan Leaf electric car. Using my Apple Mac computer, iPad, iPhone and Raspberry Pi computers and of course doing amazing stuff with my iPad.

On the Good and Geeky Channel, you'll also find playlists so that you can see all the videos for specific areas of interest.

Popular playlists such as Good and Geeky, EV20Q, Mac20Q, and NoStylus.

Let's get Social
Twitter -   / wizardgold  
Twitter -   / a20q  
FaceBook - http://goo.gl/mz4Gd

00:00 - intro
00:19 - Save time setting up a Django project
00:32 - Open Warp app and use an alias
00:46 - Setup alias in zsh.conf
01:13 - set up virtual environment
01:24 - Activate virtual environment using an alias
01:48 - Pip install Django 5
01:58 - Upgrade pip
02:07 - pip install django-environ
02:17 - Hide your secret key in a .env file
02:32 - pip install Pillow if using images in project
02:45 - make a requirements.txt file
03:03 - start Django project with a core folder
03:24 - alias ll to run exa -lh a terminal extra
03:46 - add a like to the video
03:58 - zoxide anonther useful termainl app
04:18 - start an app in the Django Project
04:39 - run the python server with an alias - saving more time
04:57 - check all is good so far and the server is running
05:16 - quick look at Neovim which also can be used as an IDE
05:34 - inside the Django folders
05:52 - Open up VS Code IDE
06:05 - add the app to the installed apps
06:19 - Using Github CoPilot to save more time
06:44 - create a urls.py file in the app
07:05 - copy some code from the core urls.py
07:22 - cleanup that code we pasted in
07:39 - Open views.py to create our first view
07:55 - CoPilot helping out again with the code
08:11 - Add the path into the url patterns in urls.py
08:40 - make the templates folder in the app
08:57 - put a folder inside the folder with the name of the app
09:14 - add the basic html code using emmet
09:31 - Just add something in the body to show in the browser
09:45 - use the termainal in VS Code
10:03 - python manage.py runserver
10:22 - add the include into the core urls.py
10:43 - CoPilot saving time again
11:02 - Copilot gets it wrong and I have to fix it later
11:24 - don't forget to add the name of the app when specifying the template
11:56 - set up the .env file to hide the secret key
12:09 - create the .env file in the core folder
12:25 - Get the secret key from the settings.py
12:43 - Put it in without the quotation marks
13:07 - Add the code for python-environ into the settings file
13:45 - Time to make a .gitignore file
14:00 - add what you want to have ignored by git
14:14 - copy and paste the code into .gitignore
14:46 - Make a repository in Github
14:59 - after initialising git add the files to be staged for commit
15:17 - in Github create the remote repository
15:46 - get the commands to push your existing local repository
16:12 - The local repo is pushed to Github
16:30 - Checking to see it was uploaded to github
16:52 - stop the server and run the migrations
17:21 - Create the superuser admin
17:55 - run the server again
18:10 - Django backend admin is working
18:23 - Django deals with protection of passwords out of the box
18:43 - Use the built in user management or django-allauth ?
19:08 - pip install django-allauth
19:34 - add to the requirements.txt
19:57 - set up django-allauth in settings.py
20:25 - add to INSTALLED _APPS
20:47 - Choose which openauth login you want to use
21:07 - Still need to create and app in developers/facebook
21:21 - Just needed to add one line of code into Middleware
21:41 - Set this up for the provide you decide to use
22:10 - Have to run migrations again
22:30 - Lots of options now in Django admin
23:02 - Sign up page - ugly but functional
23:22 - outro


Watch video Save Time Setting Up Django 5 online without registration, duration hours minute second in high quality. This video was added by user Good and Geeky 14 December 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 281 once and liked it 4 people.