1
00:00:00,120 --> 00:00:01,650
Hello, friend, welcome back.

2
00:00:01,890 --> 00:00:07,990
In a previous video we have created on the database, and I just named the class as a blog and for the

3
00:00:07,990 --> 00:00:15,690
blog to have added some of the field as a autofill blog, titles like Blog Content Blogging is published

4
00:00:15,690 --> 00:00:17,040
did and the job they did.

5
00:00:17,610 --> 00:00:23,160
So now I want to do I want to create another class and create another class for the comments.

6
00:00:23,160 --> 00:00:28,080
And also I want to add on to the like system for the reasons I want to create another class for the

7
00:00:28,080 --> 00:00:28,530
likes.

8
00:00:28,920 --> 00:00:30,510
Like if you want to do that.

9
00:00:30,510 --> 00:00:32,610
Well, first of all, I want to create on the class.

10
00:00:33,240 --> 00:00:35,970
So here I want to create the class.

11
00:00:36,720 --> 00:00:38,670
And I just named the class as a comment.

12
00:00:39,030 --> 00:00:40,980
That will be our blog comment actually.

13
00:00:41,220 --> 00:00:45,060
OK, that will be as a blog comment and it will be just like the same.

14
00:00:45,060 --> 00:00:48,990
It's still being edited, our models and then the model.

15
00:00:49,230 --> 00:00:49,650
Right.

16
00:00:49,800 --> 00:00:52,320
And then here I want to do for the comment.

17
00:00:52,320 --> 00:00:58,890
I want to add some of the field and before and that field here also, we have to give some of the relation

18
00:00:58,890 --> 00:01:05,010
that is with this comment actually relation we have to add with our this blog and also with our this

19
00:01:05,040 --> 00:01:05,520
user.

20
00:01:05,880 --> 00:01:06,240
Right.

21
00:01:06,600 --> 00:01:11,000
Because of all user will put that comment to a specific some of the blog.

22
00:01:11,160 --> 00:01:11,500
Right.

23
00:01:11,540 --> 00:01:13,720
So here we have to create both of these.

24
00:01:13,760 --> 00:01:19,620
So first of all, I want to do want to add that our blog, that is which blog post.

25
00:01:19,630 --> 00:01:22,510
You want to put that comment.

26
00:01:22,920 --> 00:01:26,960
So with these models here, also, we have to end it there on the foreign key.

27
00:01:27,540 --> 00:01:29,390
So it will be our reach class.

28
00:01:29,440 --> 00:01:31,500
I think you already understand it.

29
00:01:31,500 --> 00:01:35,760
It will be obviously without this class or this blog class.

30
00:01:35,760 --> 00:01:36,050
Right.

31
00:01:36,390 --> 00:01:44,610
So into the class area, I just simply added as the same as the on dialect and then models and then

32
00:01:44,620 --> 00:01:47,250
also be as one of the function as a cascade.

33
00:01:48,660 --> 00:01:50,610
So which will be as a cascade.

34
00:01:50,610 --> 00:01:50,970
Right.

35
00:01:50,970 --> 00:01:56,310
And also to put that relation name, that means a related name, that related name.

36
00:01:56,310 --> 00:02:00,660
And for this one I name it as a blog underscore comment.

37
00:02:01,770 --> 00:02:03,510
So it will be as a blog comment.

38
00:02:03,510 --> 00:02:06,420
And also we have to create another relation with our user.

39
00:02:06,450 --> 00:02:11,730
That means which user actually pulled that comment so far, the reasons I take another variable as user

40
00:02:11,730 --> 00:02:17,610
and then with our models here also we have to declare on the foreign key and these foreign key, we

41
00:02:17,610 --> 00:02:20,550
have to create that relation with our which class.

42
00:02:20,550 --> 00:02:22,410
We have to create the relation with our user.

43
00:02:22,410 --> 00:02:22,690
Right.

44
00:02:23,100 --> 00:02:27,280
So for the regions here, I have already loaded in put our user.

45
00:02:27,300 --> 00:02:35,490
So with this user, it will be just like the same as the on select, on underscore on the left with

46
00:02:35,490 --> 00:02:38,010
this model and then the cascade.

47
00:02:39,300 --> 00:02:40,890
So that will be as a cascade.

48
00:02:40,890 --> 00:02:48,600
And also I put some of the related name related name for this, whatever he wants right now and make

49
00:02:48,600 --> 00:02:49,440
it as a user.

50
00:02:49,830 --> 00:02:51,630
OK, user underscore comment.

51
00:02:52,560 --> 00:02:58,920
So be as a user comment I hope is very much clear to friend because of all this comment with this comment

52
00:02:58,920 --> 00:03:06,540
actually connected with all of this, plus one of that user that we user actually put that comment and

53
00:03:06,540 --> 00:03:12,600
this user who exactly put that comments right, that means this user put that comment through the specifics

54
00:03:12,600 --> 00:03:14,130
of the block for the reasons here.

55
00:03:14,130 --> 00:03:21,420
I just put that relation with our blog that is our block class and also create the relation with our

56
00:03:21,420 --> 00:03:22,050
user class.

57
00:03:22,380 --> 00:03:28,500
And for the comments I want to do to create some of the feel here, it will be the only one feel actually

58
00:03:28,530 --> 00:03:29,580
as a comment.

59
00:03:30,070 --> 00:03:31,830
OK, just name it as a comment.

60
00:03:31,830 --> 00:03:36,750
And then with our models, with these models, this will be as a multiple text.

61
00:03:36,750 --> 00:03:41,190
For instance, I just name as a our type will be as the text filter.

62
00:03:41,880 --> 00:03:47,760
So I just simply added that textual type and also our comment that will be needed, I name it another

63
00:03:47,760 --> 00:03:54,930
one as a comment underscored date and commented, will be done with the models, with these models who

64
00:03:54,960 --> 00:03:56,610
should be at the date field.

65
00:03:56,880 --> 00:03:57,280
Right.

66
00:03:57,600 --> 00:04:07,260
And at the date and fields will be also as an auto auto now ad so auto no that I just make as a true.

67
00:04:08,070 --> 00:04:09,810
So I just make it as a true.

68
00:04:10,110 --> 00:04:16,140
That means automatically when this user will put that comments automatically spudding that that in the

69
00:04:16,140 --> 00:04:20,310
comments that OK, so you should be automatically saved this date for the reasons here.

70
00:04:20,340 --> 00:04:27,000
I make it as a true I hope it's very clear to your friend and also to do and to create another class

71
00:04:27,810 --> 00:04:30,330
and to create another class for the likes.

72
00:04:31,080 --> 00:04:34,740
So I just named one of the class name as it likes because of all.

73
00:04:34,740 --> 00:04:40,680
I also do want to discuss about the things we do with some user if if some user wants to like some of

74
00:04:40,680 --> 00:04:42,810
the post or the dislike some of the post.

75
00:04:42,960 --> 00:04:44,150
So how can they do it?

76
00:04:44,160 --> 00:04:49,560
OK, so for the reasons I just simply created on the class as it likes and here it will be just like

77
00:04:49,560 --> 00:04:50,100
the same.

78
00:04:50,640 --> 00:04:54,690
That is a modules in it, it will be integrated, our models and the model.

79
00:04:55,710 --> 00:04:56,070
Right.

80
00:04:56,070 --> 00:04:57,270
So that is our model.

81
00:04:57,270 --> 00:04:59,970
And here we have to do we have to put.

82
00:05:00,030 --> 00:05:05,520
A relation here also we have to put the relation with our SIM as a blog and the use that that means

83
00:05:05,520 --> 00:05:08,180
which user like which post, right?

84
00:05:08,490 --> 00:05:10,460
So that will be the same.

85
00:05:10,470 --> 00:05:13,190
That will be we have to create that relation with our blog.

86
00:05:13,590 --> 00:05:15,980
And also we have to create that relation with our user.

87
00:05:16,230 --> 00:05:18,730
That means we choose our like our which post.

88
00:05:19,500 --> 00:05:26,040
So I just simply take one of the variables as a blog and then models.

89
00:05:26,490 --> 00:05:33,870
And also here we have to declare the foreign key so that these foreign keys I want to put that front

90
00:05:33,870 --> 00:05:35,940
gate Guter which class or block plus.

91
00:05:36,720 --> 00:05:38,190
So it will be as a blog.

92
00:05:38,580 --> 00:05:47,070
And then the only clicked on underscore dialect with this model is just like the same as the cascade.

93
00:05:47,970 --> 00:05:53,940
So which will be as case because that means when our D block will be elected, this small block related

94
00:05:53,940 --> 00:05:55,230
lives will be selected.

95
00:05:55,260 --> 00:06:02,070
OK, and also here, when our this block will be elected, when our decision will be elected, this

96
00:06:02,070 --> 00:06:04,870
user related, every comment will be also elected.

97
00:06:05,250 --> 00:06:09,800
So for the results here also want to do the same things as on the elect model as a cascade.

98
00:06:09,810 --> 00:06:20,070
And I also want to put that on the related name related related name and related name will be as a Leicht

99
00:06:21,000 --> 00:06:22,770
like Alesco block.

100
00:06:22,800 --> 00:06:25,870
So here we will actually use that related name later.

101
00:06:25,910 --> 00:06:30,960
So right now I just name it as a like blog and same as for the user.

102
00:06:31,890 --> 00:06:38,940
For the user with this models is to be able to take one of the foreign key and then I want to create

103
00:06:38,940 --> 00:06:45,570
the relation with our user model and then on the left with this model.

104
00:06:45,840 --> 00:06:47,580
And it should be as a cascade.

105
00:06:48,270 --> 00:06:48,740
Right.

106
00:06:48,750 --> 00:06:56,100
So I just simply added as a cascade and then our related name, sorry, a related name.

107
00:06:56,250 --> 00:07:00,970
And I just put that name as a Laker icon, like a user.

108
00:07:02,340 --> 00:07:04,210
So that will be our name.

109
00:07:04,320 --> 00:07:04,980
Perfect.

110
00:07:04,980 --> 00:07:09,760
I hope is very much clear to your friend who I am actually using the comments and the lights.

111
00:07:09,780 --> 00:07:12,840
And then that is our block class.

112
00:07:13,830 --> 00:07:17,820
That is, are all that block class feel that your comments felt perfect.

113
00:07:17,820 --> 00:07:19,520
So now we are ready to migrate it.

114
00:07:19,530 --> 00:07:20,550
So if you're not together.

115
00:07:20,550 --> 00:07:26,090
Savol And now to my Get Out this I blog, so open it.

116
00:07:26,100 --> 00:07:27,920
So that is our appropriate location.

117
00:07:27,930 --> 00:07:29,650
That means our my blog project.

118
00:07:30,030 --> 00:07:37,660
So here first of all, I want to magnify it as a pie and then Manase Pie in the mix did not like to

119
00:07:37,710 --> 00:07:38,450
enter.

120
00:07:39,360 --> 00:07:42,800
So that is our play, our previous one look better.

121
00:07:42,810 --> 00:07:50,100
I just closed it so I just simply close it and now open our terminal again and make that feel you save

122
00:07:50,100 --> 00:07:50,430
all.

123
00:07:50,760 --> 00:07:55,830
And now here I want to add as a pie and the manager pie and then my great.

124
00:07:58,220 --> 00:08:05,740
Enter and now apply all that migration, so no one to make out this adblock, so if you want to migrate,

125
00:08:06,110 --> 00:08:16,340
then by and the man is thought by and make migration's make Magnuson's our app name as the app unrecyclable

126
00:08:16,340 --> 00:08:16,750
blog.

127
00:08:17,480 --> 00:08:18,940
So that will be our app blog.

128
00:08:18,950 --> 00:08:19,340
Right.

129
00:08:19,370 --> 00:08:26,390
So that is our by Manase by MK Migration's and our blog knuckleballers enter.

130
00:08:27,500 --> 00:08:32,870
Yeah, you can see so perfectly created, that means that our initialised all that fire as a model,

131
00:08:33,260 --> 00:08:36,060
as our blog likes and the comments.

132
00:08:36,080 --> 00:08:38,540
So that is actually our all that glass.

133
00:08:38,540 --> 00:08:43,370
I have declared, you know, a particularly small area as a comment and the likes.

134
00:08:43,700 --> 00:08:44,150
Perfect.

135
00:08:44,510 --> 00:08:49,790
So no one to do want to actually migrate it by man is not by.

136
00:08:49,790 --> 00:08:53,080
And Margaret clear enter.

137
00:08:54,590 --> 00:08:54,920
Yes.

138
00:08:54,920 --> 00:08:55,450
No kisses.

139
00:08:55,460 --> 00:08:57,760
No successfully migrate our data database stable.

140
00:08:58,160 --> 00:09:02,550
So friend here we already did our default all the database table.

141
00:09:02,560 --> 00:09:05,380
Right now we can actually create some of the super user.

142
00:09:05,400 --> 00:09:12,580
So as I told you before, in fundamental right now, if you run this project that is our end of the

143
00:09:12,590 --> 00:09:18,050
terminal, I want to open another terminal and not server as a pie.

144
00:09:18,050 --> 00:09:22,700
And the man is thought by and run server because enter.

145
00:09:26,910 --> 00:09:35,640
And here you can see our subways now running, so if you now compete and now if you open it so you can

146
00:09:35,640 --> 00:09:41,610
see our project is done successfully and is also here if you go to that admin.

147
00:09:43,450 --> 00:09:49,090
And he could see that it had been so known to do and to create some of the super user for access our

148
00:09:49,090 --> 00:09:52,790
admins, so fundamental, I have already discussed about that things with your friends.

149
00:09:52,810 --> 00:09:54,600
I hope you already know about it.

150
00:09:54,970 --> 00:09:58,890
So right now, I open out another terminal, this one.

151
00:09:59,170 --> 00:10:03,280
So if you want to create some of the super user, then what exactly you have to do?

152
00:10:03,520 --> 00:10:09,280
You have to write as a pie and the man is dot by, dot by.

153
00:10:09,490 --> 00:10:16,000
And then I want to create the super user as a create super user.

154
00:10:16,120 --> 00:10:16,520
Right.

155
00:10:16,690 --> 00:10:22,270
So that is our common line as a pie managed by somebody who's not likely to enter.

156
00:10:22,900 --> 00:10:27,190
First of all, you should be put that name as whatever you want.

157
00:10:27,200 --> 00:10:28,560
So there is a clear Amjad.

158
00:10:28,570 --> 00:10:31,090
So if you want, that is my default computer name.

159
00:10:31,100 --> 00:10:33,040
So if you want to use it, you can use it better.

160
00:10:33,070 --> 00:10:34,120
I just want to use it.

161
00:10:34,120 --> 00:10:35,080
I just simply copy it.

162
00:10:35,150 --> 00:10:38,000
And then you can also add another name on here.

163
00:10:38,020 --> 00:10:40,940
So in fundamental, I have already discussed about the things we do.

164
00:10:40,960 --> 00:10:42,520
So right now I just simply say it.

165
00:10:42,550 --> 00:10:47,470
That will be our user name because they enter and then our email address.

166
00:10:47,470 --> 00:10:50,740
I just name it as an admin at the rate Gmail dot com.

167
00:10:51,660 --> 00:10:56,860
OK, that means that the original dot com click the enter and I just put password as you do me.

168
00:10:57,190 --> 00:10:58,690
One, two, three, four, five point.

169
00:10:58,690 --> 00:11:05,950
You write that password is to be not visible, so make sure you put appropriate password to enter and

170
00:11:05,950 --> 00:11:08,440
again you do me one, two, three, four, five.

171
00:11:08,800 --> 00:11:09,840
Because they enter.

172
00:11:09,970 --> 00:11:10,320
Yeah.

173
00:11:10,350 --> 00:11:15,020
You can see it's not created as a super user created successfully so better.

174
00:11:15,050 --> 00:11:16,000
I want to save it.

175
00:11:16,030 --> 00:11:19,690
That will be our username and password as you demand the three, four, five.

176
00:11:20,200 --> 00:11:26,290
OK, so here we successfully created our user and our user name as the Amjed and that is our password

177
00:11:26,620 --> 00:11:27,430
is perfect.

178
00:11:27,670 --> 00:11:29,050
So now if you want to access it.

179
00:11:29,050 --> 00:11:30,970
So our server is now running.

180
00:11:31,390 --> 00:11:36,100
If you want to access it now, I just want to access it, refresh it.

181
00:11:36,100 --> 00:11:44,380
So our password and that means our user name as a just and also password you give me one, two, three,

182
00:11:44,380 --> 00:11:45,040
four, five.

183
00:11:45,040 --> 00:11:46,100
Because of logging.

184
00:11:46,990 --> 00:11:47,440
Yes.

185
00:11:47,440 --> 00:11:52,750
You can see, you know, we can actually successfully logged in, but here our block table is not visible

186
00:11:52,750 --> 00:11:53,770
because of all here.

187
00:11:53,770 --> 00:11:55,380
I didn't register it right.

188
00:11:55,390 --> 00:11:57,520
So here I didn't register that piece.

189
00:11:57,520 --> 00:12:00,600
If you want to register it, you have to register it in our admin.

190
00:12:00,610 --> 00:12:03,720
So in fundamental, I have already discussed about that things with you.

191
00:12:04,210 --> 00:12:08,740
So that is, you know, are from and from our blog.

192
00:12:08,750 --> 00:12:12,950
That means you can actually make that is also as a form directly.

193
00:12:12,970 --> 00:12:21,820
And then with this hour from here, I want added our models and from here I want to import all the third

194
00:12:21,820 --> 00:12:22,270
class.

195
00:12:22,270 --> 00:12:24,790
So I have created the class as a blog.

196
00:12:25,000 --> 00:12:25,440
Right.

197
00:12:25,480 --> 00:12:27,520
So if you go to that models.

198
00:12:28,210 --> 00:12:37,090
So I have created the class as a blog and the comment is also to add that as a comment and then another

199
00:12:37,090 --> 00:12:39,120
one as it likes.

200
00:12:39,120 --> 00:12:42,800
So I just simply added another one, as it looks like.

201
00:12:42,890 --> 00:12:44,380
So that is all that our feel.

202
00:12:44,890 --> 00:12:46,210
That means all the DOT class.

203
00:12:46,570 --> 00:12:51,790
And also after that we have to do we have to register it so that because, you know, admin and then

204
00:12:51,790 --> 00:13:00,280
side and the register, register and register, first of all, it will be as a blog, it will be as

205
00:13:00,280 --> 00:13:01,050
a blog.

206
00:13:01,060 --> 00:13:07,990
And then also it'll be another one of the comments, another one the likes.

207
00:13:08,450 --> 00:13:13,480
Now if you look at the Savol and now if you refresh it.

208
00:13:14,500 --> 00:13:20,410
Yes, you can see so perfectly we display our blog, so that is our application name and the application

209
00:13:20,410 --> 00:13:21,130
I have created.

210
00:13:21,410 --> 00:13:24,570
This one is the blogs comments and the likes.

211
00:13:24,640 --> 00:13:27,100
My friend, I hope, is very much clear to you.

212
00:13:27,370 --> 00:13:29,440
And also I have created another one.

213
00:13:29,440 --> 00:13:32,400
I have created another model that is our user profile.

214
00:13:32,410 --> 00:13:34,270
So I also want to do this study.

215
00:13:34,310 --> 00:13:35,990
So that is our blogging.

216
00:13:36,580 --> 00:13:39,010
Go to our app logging admin.

217
00:13:39,490 --> 00:13:43,080
So first of all, here we have to add our appropriate location.

218
00:13:43,090 --> 00:13:45,540
That is our models from here.

219
00:13:45,550 --> 00:13:49,350
I want to import I want to put out this class as a user profile class.

220
00:13:49,360 --> 00:13:49,630
Right.

221
00:13:49,930 --> 00:13:58,150
And then we have to do we have to study it in our admin and then site and then register that in the

222
00:13:58,150 --> 00:14:02,890
register, register our class name, our class name I have created as a user profile.

223
00:14:03,280 --> 00:14:03,740
Perfect.

224
00:14:03,760 --> 00:14:09,180
Now, if you click on this and now go to our back in the difference.

225
00:14:09,790 --> 00:14:14,480
Yeah, you can see that is our application name as they are blogging and they are blogging here.

226
00:14:14,500 --> 00:14:17,040
I have created on the table as a user profile.

227
00:14:17,350 --> 00:14:21,520
And if you know, open that user profile, go to our ad profile here.

228
00:14:21,520 --> 00:14:24,460
You can see that is actually our bit by default user.

229
00:14:24,460 --> 00:14:28,420
And here I have created another one of the feel as a profile picture.

230
00:14:28,990 --> 00:14:34,660
So now everything I think everything will be based are very clear to you here can see our user.

231
00:14:34,660 --> 00:14:38,910
And there is the profile that is one of the feel of the profile picture.

232
00:14:39,250 --> 00:14:41,620
So no, because it's not showing us the profile picture.

233
00:14:41,980 --> 00:14:47,920
And also, if you go to our home for the blog and for the blog, if you go to that ad blog and the ad

234
00:14:47,920 --> 00:14:49,480
block area here, you can see.

235
00:14:49,570 --> 00:14:51,030
So that is all that our feel.

236
00:14:51,040 --> 00:14:54,970
So if you go to our model, that means, you know, our blog model.

237
00:14:54,970 --> 00:15:01,750
So for the blog that is our author blog title, that is Aslak, you can see that the author automatically

238
00:15:01,750 --> 00:15:06,550
right now I have only one that I have created on the user as a super user is visible.

239
00:15:06,550 --> 00:15:11,220
So Inupiats of the user automatically you can select that user from this position.

240
00:15:11,230 --> 00:15:14,350
OK, and then there is a put a title here.

241
00:15:14,350 --> 00:15:18,910
You can see I just simply here that is our Barbas name tag with this Barbas name.

242
00:15:18,910 --> 00:15:21,250
I as I told you, just like that as a level.

243
00:15:21,550 --> 00:15:26,780
So you should pull the title for the reasons this title is not showing as I put the title.

244
00:15:27,220 --> 00:15:31,930
So here there is a title and then the flag and then whatever you will mind.

245
00:15:31,930 --> 00:15:36,210
So that is also I added, I have added another one as a Barbas.

246
00:15:36,220 --> 00:15:40,870
So what is in your mind and for the varvakis for the images.

247
00:15:40,870 --> 00:15:45,120
I name it as a blog images so you can see snowshoeing as a blog image.

248
00:15:45,140 --> 00:15:46,390
What is your mind.

249
00:15:46,690 --> 00:15:48,600
And that is our text field area.

250
00:15:49,270 --> 00:15:56,200
So here I have added as our image type and then for the blog content as a text field.

251
00:15:56,200 --> 00:15:58,060
So that is our text feel right.

252
00:15:58,420 --> 00:16:00,910
So every field is now perfectly working.

253
00:16:00,910 --> 00:16:07,390
So here we successfully created the table that that stable and also we have added some of the database

254
00:16:07,390 --> 00:16:08,050
table field.

255
00:16:08,440 --> 00:16:12,920
So now we have to do we have textual visibility in our funding, so can visibility.

256
00:16:12,940 --> 00:16:16,210
In our next video, I will show that things with the live example.

257
00:16:16,570 --> 00:16:19,930
So thanks for watching and I will see you in the next video.
