1
00:00:05,540 --> 00:00:09,710
Welcome back, everyone, to this section of the course, we're going to discuss jingo forms.

2
00:00:10,830 --> 00:00:16,350
We've been able to use HDMI forms to allow client users send information in their browser to the back

3
00:00:16,350 --> 00:00:17,850
end of our jingo application.

4
00:00:18,270 --> 00:00:23,850
Then the Jenga website could create, read, update or delete information in the database based off

5
00:00:23,850 --> 00:00:25,800
the inputs on their HTML forms.

6
00:00:27,210 --> 00:00:32,369
Now, user interactions based on each HTML forms are extremely common across the internet on various

7
00:00:32,369 --> 00:00:37,080
websites whenever you find yourself having to input information and then that updates something on the

8
00:00:37,080 --> 00:00:37,590
back end.

9
00:00:37,620 --> 00:00:40,110
That's pretty much an HTML form in action.

10
00:00:40,590 --> 00:00:46,290
However, given what we know so far, each HTML forms require a lot of processing to connect with Django,

11
00:00:46,680 --> 00:00:49,440
especially if we want to later connect these inputs to models.

12
00:00:49,800 --> 00:00:55,920
Recall that previously we had to manually define that entire HTML form inside the template and then

13
00:00:55,920 --> 00:01:01,590
do python processing on the backend in order to connect all the labels and inputs to the actions we

14
00:01:01,590 --> 00:01:04,890
wanted to actually do inside of Python and Django.

15
00:01:06,330 --> 00:01:12,180
Now, fortunately, forms and inputs and interactions with fake clients on the browser side of things

16
00:01:12,510 --> 00:01:18,420
is so common that Jane comes off a built in forms class, which can be used with Django and Python to

17
00:01:18,420 --> 00:01:22,470
create forms and then send that form to the template through a simple tag call.

18
00:01:22,800 --> 00:01:27,870
So essentially, you're going to be able to replace all those lines of HTML form code with a simple

19
00:01:27,870 --> 00:01:31,230
tag, and you can do all the heavy lifting on the back end.

20
00:01:32,600 --> 00:01:37,850
So this allows us to rapidly develop forms for the client while only needing to work mainly of Django

21
00:01:37,850 --> 00:01:38,610
and Python.

22
00:01:38,630 --> 00:01:43,880
It's super useful and super convenient, and it's going to be a huge productivity improvement and make

23
00:01:43,880 --> 00:01:47,990
our overall website code a lot more readable, especially on the template side of things.

24
00:01:49,440 --> 00:01:55,170
So we're going to discuss in this section is have a review of how get post and COSGRIFF actually work.

25
00:01:55,440 --> 00:02:00,540
We've talked a little bit about them when discussing HMO forms, but to really understand general forms,

26
00:02:00,840 --> 00:02:06,470
clearly we need to just have a review of what we mean by get and post requests, as well as security

27
00:02:06,480 --> 00:02:07,050
of CSR.

28
00:02:07,050 --> 00:02:12,480
If then, we'll talk about how to actually create a jingle form, talking about the very basics of the

29
00:02:12,480 --> 00:02:17,910
jingle form class that we'll discuss in slightly more detail things like form fields and validation,

30
00:02:18,240 --> 00:02:24,240
as well as form widgets and actually using CSR styling on the jingle forms that with the tags that are

31
00:02:24,240 --> 00:02:25,770
sent back to the templates.

32
00:02:26,100 --> 00:02:30,750
And then we're going to talk about a specific class called model forms, which essentially creates an

33
00:02:30,750 --> 00:02:36,990
automatic form based off the attributes inside your model's class, easily allowing you to connect a

34
00:02:36,990 --> 00:02:40,860
model in the back end all the way to a form on the front end.

35
00:02:41,160 --> 00:02:44,130
And later on, we'll see how this can be extended to class based views.

36
00:02:44,940 --> 00:02:46,170
All right, let's get started.

37
00:02:46,230 --> 00:02:47,340
I'll see you in the next lecture.

