This video covers Part 4: Forms and Generic Views of section “Getting Started” from the Django Documentation.
00:00 – Intro
00:25 – Something to ease my eyes
01:42 – Let’s start Tutorial 4
01:53 – Write a minimal Form
10:39 – Edit polls/views.py
Adjusting views to match the newly created Form. Here we will replace codes in the Vote view with the new one the actually do something rather than just display a phrase “You’re voting on question…”
21:50 – Create polls/results.html
Create a new template polls/results.html for our beloved “polls” app.
23:03 – Let’s see the changes
29:30 – Using Generic Views
The shorter the code the better, right? It’s not save time & effort to write codes, but also help maintaining & editing such codes to be much easier. For this, Django rocks! Generic Views help you save a lot of time as these provide various helpful “out-of-the-box” functions.
33:15 – Amend URLconf
In this step we are editing file: polls/urls.py to use with our Generic Views.
35:35 – Amend Views
Addition to above step, we also replace codes in polls/views.py to match our Generic Views setting.
43:01 – Checking the changes
Remember our command: “python manage.py runserver”? Use it within the folder contains manage.py file to run Django’s Development Server. Then use your internet browser and go to “http://127.0.0.1:8000/polls/1/” and checking the changes we have made so far.
46:25 – Thanks and see you in the next video.
More on topic “Django Documentation, Getting Started”
This series can be found on: https://viws.net/category/django4beginners/
You may go to my YouTube Channel for more videos: https://www.youtube.com/channel/UC6JVvyI4k6zzh9vJNhRClRw