Hello, friend, welcome back.
In a previous video, we successfully complete our business, successfully updated our navigation bar.
So now in this video, I want to work with our block.
So into the block base here, we want to create some of the block.
How can create how can your block, how can display your all that block list and also for the block
detail space, everything in step by step.
I will show you some friend here.
I if you want to actually updated it from the back end, you can update it because of volume to the
back end.
Everything is ready.
Right.
But here I want to do want to create another form for our displays that means to when this user will
be logged in.
This user want to create some of the block, how can create it.
So step by step will cover it.
So for doing this, first of all, I want to do and to create some of the necessary file.
So I have already complete our app logging portion.
That means the authentication portion and that is our block cinder block before I have already created
as a block listener and want to create some of the essential file I think is a new file.
And now I want to do for create that block.
I want to create another piece as a create, create, underscore, block dot as HTML.
So that will be one of the page for create that blog.
And also we will need to display our blog details.
That will be as a blog underscore details, blog details.
DOT is HTML.
And if you want to update that means you've only read this blog for the edit blog.
I want to create another page and I name it as the edit edit underscore blog, right blog not as HTML.
It will be as a blog dartez html.
And also if you want to create another page like which you this user right now I'm already logging with
the test that is our user name, etc. So he's going to visible this user aspecific.
All that blog, that blog is created by this user.
If you want to display that on blog, then you can also do that work.
Leadbitter, I want to create another piece and I.
Mm.
On my blog.
OK, my underscore blocks because that will be as my rescue blog start this term also.
Which blog is created by this user.
I want to save it in our and also and visible visibility in our my blog statistical base.
So now here first of all we have to do we have to add our initial all the things like extended our basis
to email and then the title will be needed.
Right.
So better I copied.
I copied.
And now in our blog details, I pasted.
It should be as a blog blog sorry, blog details resurvey as a blog.
Details here.
We don't need this.
I will be it.
That will be our bloddy blog and the resource and blog.
Right.
And also on that, that in our edit it will be an edit edit blog and then that is on my blog I posted
it will be as my blog will be as my blog.
Right.
And then there is I want another one of the create blog.
So that is extended our business to email and then it will be as a create create blog.
Right.
So that will be the create blog.
That will your title and that is our body.
Perfect now because it Savol everything is great.
So right now, first of all, I want to do want to work with our create blog.
So that means that we don't need this.
I remove everything from here, the pages to email.
We don't need this.
So now we have to do we have to work in our view.
Right.
That means in our blog log into the app blog as a result of you.
So friend, before I have already discussed all the things we do, the function best.
Buzo and also add another section I have discussed about the Clausewitz's view right now.
If our blog I wanted to use that Clausewitz's view that it should be easy.
So right now to do and to use it, want to use it.
First of all, whose file is essential?
I want to do I want to load it.
So everything I have already discussed about the things we do like that, the Clarinda and the render
input.
So here from that was I thought girls from the circus.
I also need that SCDP response redirect.
So I want to do as loaded as a P response response redirect.
Right.
So that will be as a strategic response to the attack and also for the classified review that have some
of the class.
As I create a new class of review class that list view the details, view, write I want to do and actually
load everything, because here for our this blog, I want to create order and the court application,
which I have already discussed about the things we use right now.
We will use it for our this project.
So from the Django that that is all the default one and then the views.
So from the general views then that generic writes from the the Django views and that.
And from the general accounting, put all that our cloud based view, like as a create that is a create
view and also for the update to have that underclasses update view.
Right.
And then the list for the list, they have their other classes as a list view and also for the details
that the that plus other details view details.
Sorry, detailed view.
Right.
So that will be the detailed view.
And then also there is another one for the template.
I want to learn to add another class as a template.
So that's all the default, as I told you, everything in our Django views and the generic area.
So I take it as a template.
Everything will use it.
So then it will be very much clear to you and also for the Delek I want to do undertake around the class
as a direct view class dialect and then view class.
Right.
So here from our general view, generic, I want to do on import our all the default class for the create
view, the updated view from the data for display.
That leaves that there is a list view for details that will display the details.
That is our little view.
And then load the template that is a template view.
And for the direct data that is a direct view.
Right.
And also I want to load our all that model that underpins our model.
I have already created as a blog that is a comment and that is all lies.
So I also want to take all that our class.
So that is in our blog.
First of all, that is will be our form and from our blog and then the models are there.
Then you can also use that as a comma.
So I try to use it as a model.
So from what AB blog models from here, I don't even put our blog.
I want to input our comment.
So make that your spelling is correct.
There is a blog that is common and there is a likes.
Right.
So that's all we needed.
So I simply lauded as a blog comment and the likes.
And also I want to take another one and take that from and the Django.
Django from the Django and then you what.
And from here and the being put that reverse.
OK, make sure spelling is correct.
So there is the reverse and there is also another one as a reverse lazy reverse underscore lazy.
So we'll use it when you use it only because of all the things we do like that is another one of them
function as a reverse.
Lazy to note.
I just simply take it.
And also I want to do want to take our locking the word.
So that is our form and the Django and then the country cantrip from the Django country and the old
and the decorator's right for the jerkwater.
That is the import as a logi good underscore good looking very good so far.
And this locking we could actually use for the functional base view.
OK, so if you want to use this, locking the functionality in Glasvegas view, then it shall be a little
bit different.
So then here you have to do we have to use it as a form and that will be the same as it from the Django
and then the country.
Sorry, Cantrip and for the country and then the art and form the order that have also another one as
a magazine mixes and found the the sense you have to have to import this.
That will be as a logi.
That will be the locking and required good maximum.
OK, that will be as a magazine.
So if you use that functional view then you have to use as a locking the card.
And if you use that with you, then you have to use that a locking the magazine.
So it's pretty much the same.
OK, that means that is actually the same logic.
So now we will apply it because of Lear.
I want to work with our class.
Westview OK, so for the class Westview, I want to use our this locking the card maximum.
So that is from our Django country and the maximum perfect.
So now first of all, for our create block, for our tiered block, I want to create one of the functions.
So that means here I will look on the class view function.
That is the class, right.
There is a class and then I name it as a create block, create block.
So they step up on the class function, I declared.
And here also we have to do we have to pass our create that because I want to load our create class.
So I just loaded our view.
And also if you want to access that weird view, then this user must have the log in second to make
that as a locking, because as I told you, right now you are using it.
So here you have to have to pass it.
In particular, that area that means.
Now, if you want to access this class function, then you must have to the logging.
So this is automatically be checked.
And then I loaded our in our class.
That means our Class B class.
OK, so I load it and then we have to do we have to load our model.
So with this model, I want to load our blog.
That means I have already loaded our block.
That means I have models.
I want to load our blocks.
So if you go to our model, if the model for the block, I have already declared some of the field.
So I think we can actually access all that feel right so we can access all the field with this block.
So I loaded it on here and also we need to load all the template.
So here I want to do a load of the template as a create block dot estimates.
If you want to load this template in Clausewitz's view, what exactly you have to do?
You have to name it as a template, name a template under its good name and then your location that
is in our app.
Log into the app, log from here and load out, create, create, underscore, block, dot estimates.
And I hope it's very clear to you so far, except this we have to do we have to create all the.
You are right.
So now I want to do and to create on the wall in our blog that is our else.
So here I have already declared on the app name as a block and I want to do to create another URL.
So before here I have to use that class.
That is the functional view right now.
If you create some the root for the Clausewitz's view, I think you already remember it.
What exactly you have to do to make that she created the comma.
OK, that will be as a comma.
And now I named that our part will be at the right.
OK.
Right.
And that will be our Warrell.
And then into the vaidya I have to get out of the class was view as a creative blog.
Right.
So now I name it as our views into the views.
That will be our key blog.
So if you load this function, that means our class function, then what exactly you have to do?
You have to make that as a dot as underscore you.
Right.
That will be as ArcView.
I have already discussed about the things we do.
If you want to create some of the URL for your class, that is the class view function, then you have
to do it.
You have to write down like that or that is a function name.
And then as you and then our name, our name will be I just made me do the create create underscore
block.
OK, I name it as a clear block, so that will be our biggest problem.
So now I want to do I want to load it.
Let me say I want to load out this space in our Bedstemor.
That means here I want to create another menu.
OK, so I want to create another man in our that is our basic HTML into the template that is the basis
html.
So that is a logo.
That is a profile.
That is when this user will be locked in and after that then it should be visible.
Right.
For the reasons I able to do and copy it.
I take another one, I take another one and I just name it as a right block.
OK, I do.
Ah I write block and then I want to load our.
You also have already created that you are that is our apt name as a block.
So that will be our blog and the app block area.
I have created that name as a create blocks I copied and now I post it OK, so I just simply passed
it.
Now if you click as a Savol so that will be displayed in our block area.
So now if you refresh it, so now showing some of the error, make sure I open it now because it's not
showing on the already from general view, generic import and they have postponed the error as a training
comma not allowed without separating.
That means into the view in the view area here I have used as an import.
So that is our create here.
Maybe I added only space.
You can see I, I don't know about you space, but trying to make the things into the same line.
OK, that means that the same line in particular.
Same line area.
I want to use it now.
Let's check this out if you're not going to save all.
You can see his snow perfectly running, so here, friend, I have added some of these space, right.
So here I am read and I just read that things from down the line, the for the reasons actually is getting
this error.
So make sure you don't need to add any special right down under the same line.
OK, so now acquisitional perfectly now loaded.
So now if you click the save all now if you refresh it you can see it's a perfectly loaded our side.
So here that is our right blog is added.
So I added that things in our basic HTML so that the way the stimulus bill in this user will be authenticated
then it will be visible.
Right.
That is.
All right.
Blog.
So now in our view into the video, first of all, that is our I get that model data.
So now I want to do want to get all that our model.
That means if you go to our model into the model for the blog that have on the field, I want to get
all the Darfield.
So if you want to get that field here, you have to do that down as a field.
So I take our all first time.
So if you want to get that for all field, I have already, because of all the things we do online and
then all I want to do is to get all that our field.
So now we have to do we have to work in our discrete block.
That means, you know, create blowtorches.
Tamalpais So here we have to do we have to load one of the form into the form area.
And if you load that form automatically, we will get all that our field and automatically it's visible
on here.
Right.
So better right now I have to do I want to continue this process.
In our next video, we create our D block from base so we can do that work.
I will show you that things with a live example.
So thanks for watching and I'll see you in the next video.