1
00:00:00,180 --> 00:00:01,830
Hello, friend, welcome come back.

2
00:00:02,340 --> 00:00:07,390
In a previous video, we have created one of the farm with using that storm attack, right.

3
00:00:07,710 --> 00:00:13,160
So now in this video, I want to do want to discuss about the have also of the building farm in Django.

4
00:00:13,320 --> 00:00:18,840
So how can you use this building farm and with this building farm, how much easily you can create this

5
00:00:18,840 --> 00:00:20,800
type of farm in this video?

6
00:00:20,820 --> 00:00:24,060
I will show you that things with the live example for doing this.

7
00:00:24,070 --> 00:00:27,230
First of all, we have to do we have to create one of the farm file.

8
00:00:27,510 --> 00:00:30,720
So in our application, that is our first application.

9
00:00:30,720 --> 00:00:31,040
Right.

10
00:00:31,080 --> 00:00:34,070
So this first application, I want to create one of the new file.

11
00:00:34,170 --> 00:00:37,980
So I just got a new file and here I just name it as a farms.

12
00:00:39,040 --> 00:00:41,080
OK, just name it as a farm dog fight.

13
00:00:41,190 --> 00:00:46,030
So I have created on the file as a farm dog fight to enter.

14
00:00:46,290 --> 00:00:48,950
So now you can see there is a flower farm start a fire fight.

15
00:00:49,260 --> 00:00:53,810
So now here first of all, we have to do we have to import our Django building forms.

16
00:00:53,820 --> 00:00:54,090
Right.

17
00:00:54,110 --> 00:00:55,800
So here I have to do that work.

18
00:00:55,800 --> 00:00:58,560
So I just simply defines the farm and the Django.

19
00:01:00,120 --> 00:01:02,070
So just simply defined as the farm Django.

20
00:01:02,070 --> 00:01:07,070
And I want to do an import and import one of the building on the function as the farm.

21
00:01:08,450 --> 00:01:11,600
OK, so I just simply defined as a farmer in particular that position.

22
00:01:11,820 --> 00:01:14,720
So as I told you, that is not the building of the farm.

23
00:01:14,730 --> 00:01:16,860
So that is the building form into the Django.

24
00:01:16,860 --> 00:01:21,630
For the reasons here I defined as a farm Django just import our D farm.

25
00:01:21,790 --> 00:01:26,550
And after that, if you want to define some of the farm, you have to defining it with the specifics

26
00:01:26,590 --> 00:01:29,590
of the class that we actually did for our model.

27
00:01:29,670 --> 00:01:34,500
If you go to that model that I have created, two models are the musician and the album.

28
00:01:34,530 --> 00:01:39,290
So here I define every field that means our every database stable as it with this class.

29
00:01:39,310 --> 00:01:39,580
Right.

30
00:01:39,600 --> 00:01:41,790
And after that we define some of the variable.

31
00:01:42,150 --> 00:01:42,740
Cecil B..

32
00:01:42,750 --> 00:01:43,570
Just like that.

33
00:01:43,590 --> 00:01:44,190
Same here.

34
00:01:44,190 --> 00:01:46,620
We have to do the same things for every farm.

35
00:01:46,770 --> 00:01:48,510
You have to define one of the class.

36
00:01:48,970 --> 00:01:52,430
So I just simply define the class, OK?

37
00:01:52,440 --> 00:01:55,890
Just simply define the class and just name it as the user and the farm.

38
00:01:56,730 --> 00:01:58,710
OK, I just simply defined a user form.

39
00:01:58,710 --> 00:02:04,710
And here, first of all, we have to do we have to define with our D forms and here we have to define

40
00:02:04,710 --> 00:02:05,560
our form plus.

41
00:02:05,580 --> 00:02:07,680
So I just simply define our forms.

42
00:02:07,830 --> 00:02:11,430
OK, so I simply define our form class in particular definition.

43
00:02:12,090 --> 00:02:12,550
Perfect.

44
00:02:12,900 --> 00:02:16,920
And after that, also here I have defined some of the field rights.

45
00:02:16,950 --> 00:02:23,400
I have defined some of the field input field as a user name, and also I define the field as a user

46
00:02:23,400 --> 00:02:23,800
email.

47
00:02:24,060 --> 00:02:30,070
So for every field you have to define that things in particular that area with the variable.

48
00:02:30,420 --> 00:02:33,440
So for the every field, you have to define it so better.

49
00:02:33,450 --> 00:02:35,540
I want to take one of the variables.

50
00:02:35,550 --> 00:02:38,430
I just take on the variable as it user and the name.

51
00:02:38,670 --> 00:02:40,950
OK, I just name it as a user name.

52
00:02:40,950 --> 00:02:46,560
And then with this form that with these forms I have defined one of the type I think you already know

53
00:02:46,560 --> 00:02:47,120
about it.

54
00:02:47,120 --> 00:02:49,000
So here I define the character field.

55
00:02:50,570 --> 00:02:53,420
I just simply define the character field type.

56
00:02:53,820 --> 00:03:00,300
And also I have to do I want to take another one for our user email so they step up on the farm I want

57
00:03:00,300 --> 00:03:00,830
to use.

58
00:03:01,200 --> 00:03:04,640
So I just for this or am I just name it as user underscore email.

59
00:03:05,220 --> 00:03:11,670
OK, and then I just simply define with these forms that means with our form class and here I want to

60
00:03:11,670 --> 00:03:15,060
do I want to define the type for the email.

61
00:03:15,060 --> 00:03:17,750
I want to define as the type as email type.

62
00:03:18,570 --> 00:03:22,790
So I just simply live in an email field reference.

63
00:03:22,800 --> 00:03:24,790
I just simply define two of this on here.

64
00:03:25,140 --> 00:03:31,530
So now if you want to compare it with our estimate code like you here, if you copy it, I just simply

65
00:03:31,530 --> 00:03:32,250
copy it.

66
00:03:32,700 --> 00:03:36,400
And now in particular that position, I was simply defining it, OK?

67
00:03:36,420 --> 00:03:39,120
And I just put that things at the height.

68
00:03:40,470 --> 00:03:43,240
I just put that in particular, that area.

69
00:03:43,620 --> 00:03:46,590
Now here, first of all, that is our input type input type.

70
00:03:46,590 --> 00:03:50,610
I have defined in our e-mail as a text and also into the forms.

71
00:03:50,610 --> 00:03:55,410
That means that is actually I told you that is one of the Jianguo input, one of the building forms

72
00:03:55,440 --> 00:03:57,570
in the form I define that character type.

73
00:03:57,580 --> 00:03:59,760
That means that character type will be the text.

74
00:03:59,760 --> 00:04:00,060
Right.

75
00:04:00,330 --> 00:04:02,380
And also after that I define as a name.

76
00:04:02,760 --> 00:04:05,880
So this name is actually means our D on here.

77
00:04:05,880 --> 00:04:07,980
I define that things with one of the variables.

78
00:04:07,990 --> 00:04:10,160
So that is a variable name as it user name.

79
00:04:10,390 --> 00:04:15,750
OK, and so I just simply define two of these in particular that area and also by default it will be

80
00:04:15,750 --> 00:04:16,790
as a required.

81
00:04:16,800 --> 00:04:20,180
So they have also different type of attributes step by step.

82
00:04:20,190 --> 00:04:26,100
I will also show you how I can add different type of attributes into this Django form soon Django form.

83
00:04:26,100 --> 00:04:29,640
Everything is already built, so you have to just call it so.

84
00:04:29,640 --> 00:04:32,910
Now we have to do we have to add our this form.

85
00:04:32,920 --> 00:04:38,610
That means before I have added our D form in our view, right into the view, I have already created

86
00:04:38,610 --> 00:04:44,580
one function that is our form function in particular that position we have to defining it.

87
00:04:44,850 --> 00:04:46,230
So we have to defining it.

88
00:04:46,470 --> 00:04:47,490
That is our form.

89
00:04:47,490 --> 00:04:49,740
So we have to first of all, define that part.

90
00:04:49,750 --> 00:04:53,040
So if you want to defining it, first of all, we have to load our postings.

91
00:04:53,430 --> 00:04:57,100
First of all, we have to load our into the first step, into the final step.

92
00:04:57,120 --> 00:04:58,380
I have defined this form.

93
00:04:58,380 --> 00:04:58,670
Right.

94
00:04:58,950 --> 00:04:59,820
So now, first of all, we.

95
00:05:00,010 --> 00:05:02,680
To loaded second to load it after this.

96
00:05:02,740 --> 00:05:06,130
OK, I doubt that these this are simply defines the farm sorry.

97
00:05:06,670 --> 00:05:14,190
From our position, from our far steps, I just simply defined as a fast OK from our first step.

98
00:05:14,200 --> 00:05:16,360
And after that first step, I want to import it.

99
00:05:16,360 --> 00:05:17,860
So I want to import our form.

100
00:05:19,280 --> 00:05:25,150
OK, and we want to put our doctors in step, I want to put out this form so that disclosure forms are

101
00:05:25,190 --> 00:05:28,700
good and also we have to do we have to create the object.

102
00:05:28,700 --> 00:05:30,970
So we have to create one of the objects here.

103
00:05:30,980 --> 00:05:34,220
I defined that our class name as a user form.

104
00:05:34,220 --> 00:05:37,240
So we have to create the object for our this class.

105
00:05:37,580 --> 00:05:41,870
So in particular, that position that means in our dysfunction area.

106
00:05:42,020 --> 00:05:45,050
OK, after this here I define one of the name.

107
00:05:45,050 --> 00:05:52,010
I just click on the variable as a new underscore form and I want to create one of the objects so our

108
00:05:52,010 --> 00:05:52,530
object.

109
00:05:52,550 --> 00:05:54,580
So here I have to define our forms.

110
00:05:54,590 --> 00:06:00,650
That means all these forms, OK, into the forms, into the forms area I have already created of the

111
00:06:00,650 --> 00:06:01,170
class.

112
00:06:01,670 --> 00:06:04,880
So here I have allocated all class name as the user from.

113
00:06:04,880 --> 00:06:05,110
Right.

114
00:06:05,120 --> 00:06:06,440
So I just simply copied.

115
00:06:06,890 --> 00:06:11,320
And now here after this form I just simply define our this user from class.

116
00:06:11,870 --> 00:06:13,580
So I simply define what this class name.

117
00:06:14,030 --> 00:06:16,730
OK, and I hope is very much clear to you.

118
00:06:16,940 --> 00:06:21,050
So now we have to do I have already get all the tower to fill data.

119
00:06:21,050 --> 00:06:22,220
So that is OK to fill that.

120
00:06:22,430 --> 00:06:28,730
I have defining it with this object and I just take the things with this variable so no one to do and

121
00:06:28,730 --> 00:06:29,300
to pass.

122
00:06:29,320 --> 00:06:33,290
It was because of all we have actually displayed in our displays.

123
00:06:33,290 --> 00:06:33,640
Right.

124
00:06:33,650 --> 00:06:36,040
We have to display in our form that is stable page.

125
00:06:36,380 --> 00:06:38,410
That means that is our form, but it's Tamalpais.

126
00:06:38,780 --> 00:06:43,490
So here, if you want to pass it, then here I want to do and define of the idea fast.

127
00:06:43,770 --> 00:06:45,560
So I just named that idea the test.

128
00:06:45,670 --> 00:06:50,450
OK, I just name it as a test form, so I just name it as a test form.

129
00:06:50,450 --> 00:06:55,190
And here I want to learn to pass our all that, our variable.

130
00:06:55,190 --> 00:06:59,410
That means here I have already defined all the things that with our form and I just take the things

131
00:06:59,420 --> 00:07:03,360
with this variable and now I just simply posit in particular that area.

132
00:07:03,890 --> 00:07:09,890
OK, so I just simply posit in our discussion and also I context it, I context it in our dictionary.

133
00:07:10,160 --> 00:07:15,470
So here I get all the things in our dictionary that means in addition into the dictionary, have already

134
00:07:15,470 --> 00:07:17,660
passed out this discussion with this context.

135
00:07:17,660 --> 00:07:18,620
So that is our discussion.

136
00:07:18,620 --> 00:07:26,390
So now we can actually use our D form in our D fast app and in our form, as Tamalpais Lightford I hope

137
00:07:26,390 --> 00:07:27,680
is very much clear to you.

138
00:07:27,720 --> 00:07:31,570
So here I just pass all the data in our farmers Tamalpais.

139
00:07:31,580 --> 00:07:34,300
So now we have to work in our form is Tamalpais.

140
00:07:34,610 --> 00:07:38,300
So now go to our first step into the fourth step that is our farmers CMO.

141
00:07:38,450 --> 00:07:40,070
So that is our e-mail form.

142
00:07:40,070 --> 00:07:42,340
So better able to do on to cause here.

143
00:07:42,350 --> 00:07:48,760
I also want to display our Django form in particular the same pace, so I want to change that name.

144
00:07:48,770 --> 00:07:55,520
So this is, this is created OK, created by e-mail Corb.

145
00:07:56,720 --> 00:07:59,150
So just name it as a created best simple code.

146
00:07:59,480 --> 00:08:03,820
And after this, after this year I take the H h attack.

147
00:08:04,340 --> 00:08:07,640
So with this attack will be actually created some on the line.

148
00:08:07,670 --> 00:08:14,250
OK, and after this here I want to do on the define and address this to tag I define under the street

149
00:08:14,250 --> 00:08:15,470
tag sorry.

150
00:08:16,700 --> 00:08:21,860
Defined that is three tag and here I have to do have to define that form.

151
00:08:22,340 --> 00:08:24,770
So I just simply defined that form on here.

152
00:08:26,540 --> 00:08:27,920
So that is the word class.

153
00:08:27,920 --> 00:08:29,360
We don't need this class.

154
00:08:29,360 --> 00:08:34,490
I just simply remove it and then also index XHTML.

155
00:08:34,490 --> 00:08:39,760
So here I just make the things as a blank and methode will be as a post C in particular that area.

156
00:08:39,770 --> 00:08:43,550
So here I want to do and to display our names.

157
00:08:43,550 --> 00:08:45,860
So here I have already defined our form.

158
00:08:45,860 --> 00:08:51,110
So to this form I have to take that things with this variable that means this idea as a text from I

159
00:08:51,110 --> 00:08:57,130
just simply copied and now here I just simply pasted that mhere our form will be loaded.

160
00:08:57,140 --> 00:08:59,270
That means our Django form will be loaded.

161
00:08:59,270 --> 00:09:05,660
TriQuint I think it should be very much clear to you because here I already define our this form and

162
00:09:05,660 --> 00:09:09,080
I take that things with this variable and into the decision here.

163
00:09:09,080 --> 00:09:11,090
I define that idea into this idea.

164
00:09:11,090 --> 00:09:13,790
I pass out this form that is a new form.

165
00:09:13,970 --> 00:09:19,910
And also here, if you want to display our A3 like here, I also want to display on the I this I have

166
00:09:19,910 --> 00:09:21,530
already discussed about that things with you.

167
00:09:21,530 --> 00:09:25,960
If you want to pass on the text, how can do that work like here.

168
00:09:25,970 --> 00:09:26,680
Simple things.

169
00:09:26,690 --> 00:09:30,710
I take one the ideas a headline one are heading one.

170
00:09:30,890 --> 00:09:34,970
I just came it as a heading this one and in particular that position.

171
00:09:34,970 --> 00:09:42,950
I want to define some of the text as a this is OK, this is from using Django Library.

172
00:09:43,340 --> 00:09:44,420
Django Library.

173
00:09:46,730 --> 00:09:48,770
OK, I just name it as a general library.

174
00:09:49,100 --> 00:09:56,090
So you take that our ID, so our ID is this one as a heading once I just simply copied and I go to our

175
00:09:56,090 --> 00:10:03,230
estimate, one that we e-mail that farmers general in particular, that position here I want to display.

176
00:10:03,290 --> 00:10:07,370
So the simply displayed OK, I hope is very much clear to you.

177
00:10:07,370 --> 00:10:08,600
So now let's check this out.

178
00:10:08,600 --> 00:10:12,860
If you now click as is Savol, first of all, I want to check it.

179
00:10:13,800 --> 00:10:19,540
Yeah, everything is right now go our fan base, so that is where you are as a form, a refresh.

180
00:10:20,360 --> 00:10:21,720
Yes.

181
00:10:21,720 --> 00:10:25,010
Now, considering now, I hope it should be very muscular to you.

182
00:10:25,350 --> 00:10:27,030
So that is our estimate.

183
00:10:27,030 --> 00:10:33,630
Cold so that me with this estimate coat, I have created one of the foam and that is our Jianguo Lively

184
00:10:33,630 --> 00:10:38,610
form, how much easier it is you can see without creating any field we actually define.

185
00:10:38,610 --> 00:10:44,790
Our tour of this field will be as a user name and there will be as a user email so that our email field

186
00:10:44,790 --> 00:10:48,620
that the user feels right and also here to define our text.

187
00:10:48,620 --> 00:10:55,350
So now it should be very much clear to you what exactly the things I did on here in the form here I

188
00:10:55,350 --> 00:10:58,400
defined to have this object on object name as a user name.

189
00:10:58,410 --> 00:11:03,650
So by default, actually getting this name, that means by default, actually getting this name.

190
00:11:03,930 --> 00:11:08,690
So here you can see that name is the user at the name and the user email.

191
00:11:09,150 --> 00:11:12,170
So that is our variable, this variable, all the name.

192
00:11:12,180 --> 00:11:13,920
So here you automatically get it.

193
00:11:13,920 --> 00:11:18,990
And after that here, the front of the class as the user from class into the user, from class ab defined

194
00:11:18,990 --> 00:11:24,870
to up the subject and into this view, into this value area, I simply define all the variable as a

195
00:11:24,870 --> 00:11:25,500
new form.

196
00:11:25,500 --> 00:11:27,720
And here I have created one of the objects.

197
00:11:27,720 --> 00:11:27,990
Right.

198
00:11:28,290 --> 00:11:29,610
So I have created all the object.

199
00:11:29,610 --> 00:11:35,550
First of all, I load our form, piece that piece in the form page I imported and into this form with

200
00:11:35,550 --> 00:11:39,570
this form, I want to access our D form piece into this form base.

201
00:11:39,570 --> 00:11:44,430
I have created one of the class with our class name, so that is our user from class.

202
00:11:44,700 --> 00:11:46,830
So I just simply refineries are from class.

203
00:11:46,830 --> 00:11:47,130
Right.

204
00:11:47,340 --> 00:11:48,840
And then into the dictionary.

205
00:11:48,850 --> 00:11:54,930
I just simply pancit with this idea as a text from Idy and here I pass a new form that that means here

206
00:11:54,930 --> 00:11:55,960
I just simply pass it.

207
00:11:56,400 --> 00:12:01,710
So after that also take another ID as a headline one and this headline one here I define some of the

208
00:12:01,750 --> 00:12:04,420
same data and here I take that things with distinction.

209
00:12:04,440 --> 00:12:06,360
So we have to pass it in our farmers.

210
00:12:06,360 --> 00:12:09,630
General, for the reasons with this context, I pass our restriction.

211
00:12:10,020 --> 00:12:15,320
So now we can actually access out these attacks from Idy and headed in our form e-mail.

212
00:12:15,340 --> 00:12:16,800
So into this form is simple.

213
00:12:16,800 --> 00:12:23,490
I just simply display 8H three tag as a headline one and our action form area.

214
00:12:23,490 --> 00:12:25,500
I just simply defined as a text from.

215
00:12:25,500 --> 00:12:25,850
Right.

216
00:12:26,130 --> 00:12:29,960
So now you can see it's not perfectly getting our D form in our form base.

217
00:12:30,150 --> 00:12:33,770
So, you know, next video will do more things into this form area.

218
00:12:33,780 --> 00:12:34,850
How can do that work.

219
00:12:34,860 --> 00:12:36,960
I will show you that things with the live example.

220
00:12:37,230 --> 00:12:38,760
So thanks for watching.

221
00:12:38,760 --> 00:12:40,470
I will see you in the next video.
