1
00:00:00,300 --> 00:00:01,940
Hello, friend, welcome back.

2
00:00:02,190 --> 00:00:08,640
In a previous video for our index piece, I have already created one of the applications in the application

3
00:00:08,640 --> 00:00:09,180
area.

4
00:00:09,180 --> 00:00:14,150
You will get one of the model, but when you create one of the project in the project area here, you

5
00:00:14,150 --> 00:00:15,600
can see they have no model.

6
00:00:15,720 --> 00:00:16,080
Right.

7
00:00:16,380 --> 00:00:22,380
So for the regions here, I have actually transferred it from our main project area to one of the application.

8
00:00:22,800 --> 00:00:25,200
So into the application area that is our models.

9
00:00:25,500 --> 00:00:30,320
So into the model area by default, into the Dangote be imported one of the models.

10
00:00:30,840 --> 00:00:36,670
So now if you want to create some of the database table, you can create this database table from to

11
00:00:36,690 --> 00:00:37,310
this model.

12
00:00:37,560 --> 00:00:39,480
So don't worry is step by step.

13
00:00:39,480 --> 00:00:43,290
I will show you everything with a live example like here.

14
00:00:43,290 --> 00:00:50,160
If you go to our homepage, that is our slider part and that is our about sections into the about section.

15
00:00:50,160 --> 00:00:52,230
I want to do want to make that thing dynamic.

16
00:00:52,230 --> 00:00:56,120
That means to have some of the title and also the of the description.

17
00:00:56,130 --> 00:00:58,290
And here there is a short description.

18
00:00:58,290 --> 00:01:04,400
And also here, if you want to display some of the images, then you can also displayed so better.

19
00:01:04,410 --> 00:01:07,470
I want to create the table into the table area.

20
00:01:07,470 --> 00:01:09,950
I want to add the three different models.

21
00:01:09,990 --> 00:01:15,360
The part one will be as a title, one will be as images, another will be as a description.

22
00:01:15,400 --> 00:01:16,800
OK, that will be the tree field.

23
00:01:17,190 --> 00:01:22,130
So here, if you want to create it, then you can create it in our model area.

24
00:01:22,260 --> 00:01:24,540
So into the index in the model area.

25
00:01:24,540 --> 00:01:25,830
I want to compute it.

26
00:01:25,860 --> 00:01:27,820
OK, so how can do that work?

27
00:01:27,840 --> 00:01:37,980
If you go to Django official site, go to the Django project and then go to the documentation.

28
00:01:39,970 --> 00:01:47,260
Here, if you start with the model, OK, so if you start with the model, then everything will be more

29
00:01:47,260 --> 00:01:50,740
clear to you so that our models see the model.

30
00:01:50,740 --> 00:01:56,160
Sylvere you can see, first of all, that are models generally being bought so that the models that

31
00:01:56,500 --> 00:01:59,140
they follow on automatically added on here.

32
00:01:59,470 --> 00:02:02,410
And after that you have to we have to create one of the class.

33
00:02:02,440 --> 00:02:08,920
OK, so here you have to create one of the class and these models use models will be inherited our another

34
00:02:08,920 --> 00:02:09,380
model.

35
00:02:09,400 --> 00:02:11,640
So you have to also added that model.

36
00:02:11,830 --> 00:02:17,800
And after that here you have to do have to load your all that field which field you want to actually

37
00:02:17,800 --> 00:02:18,190
load.

38
00:02:18,400 --> 00:02:21,020
So now I want to do and actually follow the same step.

39
00:02:21,040 --> 00:02:26,860
So here after this, after this, I just simply create one button on the class.

40
00:02:27,310 --> 00:02:28,990
So I just named that class.

41
00:02:29,320 --> 00:02:33,600
OK, just name the class as about so I just name it as about.

42
00:02:33,610 --> 00:02:40,090
And then as I told you, in this direction, it will be done with this model, like with this model

43
00:02:40,090 --> 00:02:41,220
it will be inherited.

44
00:02:41,590 --> 00:02:43,650
So it will be in another model.

45
00:02:43,660 --> 00:02:45,790
So I just simply added that as a model.

46
00:02:45,960 --> 00:02:54,010
OK, and then also after that I want to do want to edit the three different three different.

47
00:02:54,010 --> 00:02:57,760
One of the field one will be as a title that image and the description.

48
00:02:57,790 --> 00:03:00,500
So now first of all, I want to do under the title.

49
00:03:01,360 --> 00:03:07,990
So that will be the title and this title that the register and or field, I just name it as a title

50
00:03:08,260 --> 00:03:10,910
and then here with these models.

51
00:03:11,500 --> 00:03:16,930
OK, so with this model you have to do we have to add your name that we feel type.

52
00:03:16,930 --> 00:03:19,000
That means which type of field it will be.

53
00:03:19,600 --> 00:03:19,930
OK.

54
00:03:19,960 --> 00:03:24,580
That means here you can see that reflected our field type as the character field type.

55
00:03:24,580 --> 00:03:27,540
So they have so many different type of field.

56
00:03:27,790 --> 00:03:31,700
So literally in our next session, I will also discuss about more about it.

57
00:03:31,720 --> 00:03:34,300
And also here you can add some of the argument.

58
00:03:34,300 --> 00:03:40,450
How can I on the argument, how can at the Dale Field option field everything a little step by step?

59
00:03:40,450 --> 00:03:41,430
I will show you, friend.

60
00:03:41,440 --> 00:03:42,100
Don't worry.

61
00:03:42,130 --> 00:03:45,230
So right now, just step by step, follow my all videos.

62
00:03:45,250 --> 00:03:47,730
So here, first of all, there is our character field.

63
00:03:47,790 --> 00:03:50,410
OK, it's also I don't want to create all that this type.

64
00:03:50,410 --> 00:03:54,100
I want the character field that is our title field will be as a character field.

65
00:03:54,400 --> 00:03:58,170
OK, so I just simply added that character field perfect.

66
00:03:58,300 --> 00:04:01,300
And then how many character field it will be.

67
00:04:01,430 --> 00:04:04,200
So here you can also add that maximum length.

68
00:04:04,200 --> 00:04:08,960
So I just simply added that the maximum and you can also add that minimum length.

69
00:04:08,980 --> 00:04:11,200
OK, so now I just name it as a maximum length.

70
00:04:12,430 --> 00:04:14,620
So maximum land for our title.

71
00:04:14,620 --> 00:04:16,660
I want to make the thing says it 100.

72
00:04:16,750 --> 00:04:22,690
OK, and also in a lot of you we define as a nullable, right.

73
00:04:22,720 --> 00:04:24,730
That means the field will be at a nominal.

74
00:04:24,970 --> 00:04:27,340
But in Django there is a little bit different here.

75
00:04:27,340 --> 00:04:30,670
If you want to display by default, that will be as a noun.

76
00:04:31,120 --> 00:04:34,060
So here, if you want to display that, you can display with the blank.

77
00:04:35,440 --> 00:04:38,470
Look with this blank and by default it will be the truth.

78
00:04:38,510 --> 00:04:40,990
Right now I want to do and make that things as an animal.

79
00:04:40,990 --> 00:04:42,340
That means here I want to do.

80
00:04:42,340 --> 00:04:43,820
I want to make things as a Democrat.

81
00:04:43,900 --> 00:04:48,410
OK, so for the reasons here I want to do and to make our animal will be as a false.

82
00:04:49,000 --> 00:04:51,000
So here I just name it as a false.

83
00:04:51,610 --> 00:04:54,040
So just name it as a false argument.

84
00:04:54,370 --> 00:04:56,680
I hope everything is very much clear to you.

85
00:04:56,950 --> 00:05:00,010
And then I want to do undertake another one as a description.

86
00:05:02,470 --> 00:05:08,590
I just take another field or further field be description and with this model and also still will be

87
00:05:08,590 --> 00:05:09,550
not the character field.

88
00:05:09,550 --> 00:05:16,090
It should be because of a little description will be a little bit maximum size on a large size.

89
00:05:16,090 --> 00:05:16,780
One of the takes.

90
00:05:16,780 --> 00:05:17,040
Right.

91
00:05:17,320 --> 00:05:22,300
So far they have also another type as a textfield types and I would love to use that text.

92
00:05:22,750 --> 00:05:29,830
So that is our text field so that we as a text field and here also to add some of the maximum length,

93
00:05:30,370 --> 00:05:36,560
OK, that is a maximum land for what this text field I want to do and to make that into the 800.

94
00:05:36,680 --> 00:05:44,780
OK, and also I blank that means I want to make that into the record so that blank will be a default.

95
00:05:45,430 --> 00:05:47,470
So I just simply make that into default.

96
00:05:47,830 --> 00:05:51,010
And then also I take another field as the image.

97
00:05:51,650 --> 00:05:58,850
I just simply edit that emails with this model, OK, with these models for the image type will be as

98
00:05:58,870 --> 00:05:59,920
emails will types.

99
00:05:59,930 --> 00:06:01,720
I just simply added as emails.

100
00:06:03,690 --> 00:06:09,390
OK, that will be as easy, Masefield, and for the inmates feel here, you have to do you have to put

101
00:06:09,390 --> 00:06:13,920
on a location that is where these inmates will be uploaded.

102
00:06:14,130 --> 00:06:16,710
OK, so here they have also another one.

103
00:06:16,740 --> 00:06:23,940
One of the function as a upload to say just simply that applaud upload underscore to that means upload

104
00:06:23,940 --> 00:06:25,230
to which position.

105
00:06:25,230 --> 00:06:30,840
Upload to will be uploaded one of the for about I want to do and each will be created along the folder

106
00:06:30,840 --> 00:06:33,690
as a about folder and the about folder.

107
00:06:33,690 --> 00:06:35,560
It'll be uploaded all that file.

108
00:06:35,760 --> 00:06:38,550
OK and also on to make the Princesa record.

109
00:06:38,550 --> 00:06:48,310
So here blank blank I want to make as a false social B as a false and here one thinks you have to remember.

110
00:06:48,330 --> 00:06:50,750
So here I have used one of the e mails type.

111
00:06:50,760 --> 00:06:52,250
That means the image will type.

112
00:06:52,260 --> 00:06:58,250
And here I added as they apply to it will be uploaded about that means about folder.

113
00:06:58,620 --> 00:07:00,360
So if you use that upload tool.

114
00:07:00,360 --> 00:07:02,950
So that is one of the Python I library.

115
00:07:02,970 --> 00:07:08,760
So if you want to use that image, Labidi, then you have to do you have to install one of the packets

116
00:07:09,120 --> 00:07:11,160
like they have one of the packets as a pillow.

117
00:07:11,190 --> 00:07:14,540
So with this pillow you can actually working with the images.

118
00:07:14,820 --> 00:07:17,580
So here you have to do you have to install it?

119
00:07:17,820 --> 00:07:21,940
OK, that means that means you have to install that pillow back.

120
00:07:22,100 --> 00:07:28,270
So if you want to start it, you have right down the pipe that the people install and the pillow.

121
00:07:29,130 --> 00:07:31,920
OK, so that will be as a peep installed pillow.

122
00:07:32,460 --> 00:07:34,290
So that is actually the common line with this.

123
00:07:34,290 --> 00:07:37,130
You can actually install it right now if you can enter.

124
00:07:37,980 --> 00:07:39,680
So it may take a little time.

125
00:07:39,690 --> 00:07:42,750
Make sure you're connected to the Internet when it to be downloaded.

126
00:07:42,780 --> 00:07:47,400
OK, but here you can see already showing as a record, already satisfied.

127
00:07:47,400 --> 00:07:50,910
That means that I have already installed a pillow in my system.

128
00:07:50,910 --> 00:07:53,220
So for the reasons you can see, it's not showing as required.

129
00:07:53,220 --> 00:07:54,690
Already satisfied either.

130
00:07:54,700 --> 00:07:58,620
Then it should be take a little time for download and install it in your system.

131
00:07:58,620 --> 00:08:01,090
So make sure you install that pillow.

132
00:08:01,110 --> 00:08:04,070
That is a pillow install that the being installed pillow.

133
00:08:04,380 --> 00:08:09,720
So you will be supported our this upload to like and dislike the idea automatically.

134
00:08:09,720 --> 00:08:15,310
It should be created on the folder as about OK, so here I have already successfully installed it.

135
00:08:15,340 --> 00:08:17,820
So right now we don't need to install it again.

136
00:08:18,480 --> 00:08:22,770
So and I hope we can all understand about how we can create some of the model.

137
00:08:23,100 --> 00:08:29,070
So here I have created around the classes about and in particular this about a year I have added three

138
00:08:29,070 --> 00:08:30,050
different table.

139
00:08:30,090 --> 00:08:30,440
Right.

140
00:08:30,720 --> 00:08:36,390
That means a table filled OK, will Terrilyn will be as about and then our table filled them will be

141
00:08:36,390 --> 00:08:39,150
as a title description and the images.

142
00:08:39,660 --> 00:08:41,270
So here I have added it.

143
00:08:41,280 --> 00:08:48,420
So now I just click the save all and now if you check your server, everything is running well.

144
00:08:48,480 --> 00:08:50,440
So now we are ready to migrate.

145
00:08:50,760 --> 00:08:51,450
So better.

146
00:08:51,450 --> 00:08:55,780
In our next video I will show you how can migrated before migrated here.

147
00:08:55,800 --> 00:08:59,140
Also you have to do we have to actually register it in our admin area.

148
00:08:59,160 --> 00:09:05,500
That means when you create this table automatically, it should be visible in our admin area.

149
00:09:06,000 --> 00:09:07,050
So how can do that work?

150
00:09:07,080 --> 00:09:07,890
Well, don't worry.

151
00:09:08,130 --> 00:09:11,510
I mean, our next video, I will show you that things with a live example.

152
00:09:12,000 --> 00:09:13,640
So thanks for watching.

153
00:09:13,660 --> 00:09:15,510
I will see you in the next video.
