Hello, friend, welcome back.
In a previous video, we successfully complete our logout portion.
So now in this video, I want to discuss about one of the most interactive things in Django.
How can display all that?
Your customized message?
OK, so that means when you logged in, there should be displays of the message that you are logged
in.
When you log out, then it will be displayed.
Some of the success say that you are logged out.
And also if you want to put on the validation, OK, if you want to add some of the validation in your
logging area, so can display this type of error message in this video, I will show you that things
with a live example.
So for doing this, they have a if you go to the Django official website.
If you go to that jungle, we shall live side and go here, so I don't need this.
And here they have also the framework as a messaging framework.
So if you know the documentation.
And here, if you start with the messages, messages, framework, so with this message, this framework,
you can actually do that work.
You can see that a text message framework.
So that is are setting everything you can actually find out on here is the messaging messages framework.
So that is actually one of the default Django framework.
So there is a message just framework.
So how can working with this is step by step?
I will show you.
And also, if you search into the Google, if you start with the Django or messages like messages in
Django, if you souce, they have the link as the messages framework, django authentication and also
the apps on the block.
So that is actually the device as a 14 using the messaging framework.
So right now, if you go here, so they have actually one of the clean instructions, how can display
these messages?
So here you can see the sitting area.
We have to add it.
And then also the view Viada, if you want to display that message, you can display like that way.
And also they have some on the tag as a success tag that is actually the template area for the visibility
and visibility.
And then also our borders are bootstrap Snapchat.
That is our setting fire into the setting here.
You can see the apps on the messages stack.
So that is our Alladin for that is our large success warning danger if you want to display all that
ad or message you can displayed.
OK, and that is our business HTML here.
So with this you can actually do that work very easily.
I step by step, I show you like first of all there is a message suggestion malaria.
What exactly you want to visible this message.
OK, so right now actually I just copy it.
So here I want to visible this message.
I just simply copied from here and I want to do all the visible lead in our logging page.
That means here, when you log out here, I want to visible some of the success message.
Right.
So that is all logging page.
Now go to our logging.
That means that is our authenticate and that is our logging.
So don't worry, everything will be very clear to you what I see or how it can actually working with
these messages so that form.
So before that phone, OK, here I want to do the visible or all that message.
So that is also one of the for loop.
And I just said that is one of the and for loop and the loop area that is allowed into the al-arabia,
there is a mass text message.
Text means it should be dynamic.
That means whatever the message text you want to visible if you want to visible that message, text
as a infl if you want to.
So that success is everything when you call it to the message success automatically.
So we display our massive success.
OK, so it'll be actually displayed and also the alert that dismissable, that means there should be
some of the icon of the clause.
You can see that one of the button and the close button from here automatically.
So we loaded and there are close button actually the CrossLink, and that is actually the message.
OK, so with this, you can actually display that message.
So I show you then everything will be more clear to you.
So first of all, here, I just want to display this message in our logging and after that, also in
our setting into the setting by here in this area, we have to we have to add it.
So I just simply copy it.
I just simply copy it from here and now go to our main project.
That means our portfolio will go to the setting and the seating area at the end.
OK, at the end after this here, I just simply paste it, OK?
I just simply pasted that message and that is all that our text.
So now I want to do all the visible visibility like here.
I want to visible that condition into the conditionally.
I just put that condition in our view.
Right.
That means right now we don't need this.
Actually, I just simply remove it the profile as HTML.
So I just take it all in logging and into the authentication, into the authentication.
If you go to that view into the area before here, you can say just put the ls that the pin.
That means whenever you have an appropriate username and password will be visible.
That means you when you put that inappropriate username and password, then it will be displayed on
the PIN message as the invalid username and password.
Right.
So I want to actually display this message with some of the validation.
So if you want to display it, first of all, also here we have to do we have to import it.
That means we have to input that messages.
If you go to that this blog and here you can see that actually you have to add one of the you can see
the level from Django country input messages.
So first of all, you have to import it.
So just simply import it on here.
I just simply paste it.
So now if you want to visible, that message is pretty simple here.
You have to do haplessly display these messages with the success ad or whatever you want.
Right now I just simply copy it and now I want to do in particular that area.
That means L.A., I just simply posted that message, will be sure that message is that is a success
message.
As I told you, they have the sound tags as a box in full success or anything at all.
So right now, to display that error because of what you told me as the error message.
Say just name it as an error message and the error message area with this cheekiest, whatever the message
you want to pass right now to pass on the message, you should be displaying the email or password or
password invalid.
So they step up onto the message itself, obviously.
OK, so now let's check this out if you don't at the Savol and now if you refresh it.
So now I just put all the inappropriate username in appropriate password is a logging.
Yes, you can see friend knows perfectly display, that means the email and the invoice, so it is invalid.
So here that is our message as a message.
Also, I just simply added another token as I just simply added the token as our this arrow.
Right.
So if you want to change it, you can change it.
If you want to make that things as a success, it should be as a different look.
OK, so I just.
Right.
Don't mind using that tag as a Aerotek and request I just bought as an email and the password invalid.
So you can see it's not showing either email and password invalid and it's on display before or after
the blocking.
That means after the logging account, that means, you know, logging pays into the logging page.
If you go into the logging base here, you can see that ejecta the messages on the Falu.
There is a clear message because of all from here so that the clear messages.
So that is actually displayed as a follow up that the messages in message.
So now there is a cloud tag, as I told you, that is all the tag is there right now.
I'm using one of the tag, so I'm using that arrow tag.
If you want to use that success tag, you can use it.
So also that there is a large image as a rule, as a alert, and also that one of the button as a close,
you can see that have also hit the button.
So that is a clue on the button as a close button.
And they're looking across sending link so that one of the spin class.
So that is one of the e-mail tech for the cross-link.
That is the one of the cross icon.
OK, so with this cross icon, you can see that the cross icon and if you click on the console now consistent,
totally gone.
So for the reasons they have also that are allowed.
So that is actually the this Mischler.
OK, so and also there is a clear message display.
So for the reasons are messages display.
Right.
I hope is very much clear to friend.
So that is a clever alert message is perfectly invisible and also needs to be log out there to display
another message better.
I logged in fast Azarian and you do me one, two, three, four, five as a login.
So right now I'm logged in.
So if you click on the log out, then it'll be displayed at one point that another message seems pretty
most simple things in our view in the video.
So when you log out, I just simply pass it right.
There is a log out request.
So here after that log out here, I want to show of the message better.
I just simply copy it.
And after that, when it should be log out, this message will be a success message.
OK, that will be our success tag because volunteers are setting can see of success tech.
So that is our success tag with this geekiest.
I want to do and pass on the message as a logout you or log out like a log out successfully.
So log successfully step up.
One of the messages will be displayed and automatically I shall be displaying all logging areas into
the logging area that we see in a logging base.
Before and after that, our logging.
Your account will be displayed on here.
OK, it's totally dynamic.
Now let's check this out if you like to save all.
So here I have added I want to log out.
Then this coordinates would be perfectly log out without this request.
Then shall we display this message right now?
Let's check this out.
If this refresh the log out.
Yes.
Now, considering now showing our message as a logger successfully and also here I use our success text.
You can see now it's perfectly visible.
I hope you like it very much so.
Now, if you want to use sound the alert, you can use that alert in Django, OK?
That means the alert message.
So that's all you have to do.
So right now, another one for the registration.
So better.
Next video I want to discuss about that registration potions.
That means how you can complete your total registry from here.
That means a user registration so we can do that work in our next video.
I'm sure that things with a live example.
So thanks for watching and I'll see you in the next video.