Hello, friend, welcome back.
In a previous video, we successfully displayed that message, option writes, How can we spread that
message?
I think is very much clear to you right now.
We don't need this.
So in this video and discussion about our distributor register option in the reception area, that is
our names and this name will be as a username, as I told your friend when you actually logged in.
So right now we are using the default one.
Right.
So here, that is easy learning.
I just simply logged in.
If you go to that user and read the user area, as I told you before, actually providing into the user
one of the table, there is a default on the table for the admin.
If the user table the username that the password, the first name, last name and the email address.
So that's all actually the default feel.
OK, so here we have to also make that feel as if our user name failed and that will be our email and
that will be the password and the password.
OK, so that no, I actually I have to do I have to use it to make sure you added.
Right now I just simply log out from here and now to work with all this register paste into the register
if you want to work.
First of all, I just simply clean everything then it's a bit better, OK, just simply clean everything
from here.
So now, first of all, here we have to do we have to work for the register.
If you go to the URL in the other area, there is a registry station that is the views I have created
that our function name as our registration.
Right.
If you go to our view into the area.
So that is our auto registration.
So now we have to do do we have to work on here before doing this?
We have to also open our template.
That means in our authentication that is already the station tablet.
So that is different than our I already said that some of the field.
So our filename or filename here, there is a name that is email, there is a password and that is our
account password.
Right.
And then our registration button.
So if you want to change that name, you can change it rather than if you want to make the things as
user name, you can use that user name.
OK, is to look OK.
The idea ID actually don't need it, but I don't want to make you confused so there is no permission
for the ID.
OK, just simply remove that ID and then that is your placeholder right.
Perfect.
So also as I told you, when you click on the registration, that means when you click the recession
button automatically.
So we go to our this from action area into the action area, you can actually add our D out.
That means you automatically should be rejected or out area that is this out.
OK, so if you want to use that, you want a name, you can use it.
That means here you have to do it, then you have to pull some of that you are OK.
So here you have to put that you are ill and then you have to put that out.
That means what exactly you want to pass?
I want to pass it in our registration, in our orchestra method.
So here you have to do it.
You have to actually pass it, OK, rather than if you don't if you make the things the empty automatically,
it will be the key to our this method area.
So here, if you want to add it, you can add it to the new Strelley.
OK, so also here added that I see a sort of token and also that is our password and the password and
password and confirm password should be the match.
Right.
So one of the things we'll put in our password area and first of all, you will be checking the password
and the password feel that this input feel is the same.
It are not.
So I have total supporter validation.
So if you want to add that validation and also if you want to show some of the message and what exactly
did in a four our locking in the locking area, I added one of the messages for you, this message that
I just simply copy it.
And now registration, uh, after that, OK, after that I want to do and actually visible it on here.
I should be sure some of the message for an hour, all the validation messages should be visible.
OK, so I just simply add that our message position on here.
Perfect.
So now we have to do the same things that we did for Aulaqi.
Go to our view and that is our registration.
That means in the registration function area.
First of all, we have to add all the starfield.
Right?
So first of all, I want to do want to put on the condition as a condition, if our request, if this
is my thought with this method, I want to do and that is actually post or not.
So I just simply, first of all, want to check it.
Right.
So first of all, here, I want to check if that request is posted or not.
What is the request?
I pass from our register.
So first of all, I want to check it, OK?
And then here we have to do we have to put all the dog name.
So I just name it as a username.
Sorry, username.
I needed the username.
Maybe I should be just like the same.
The request.
That all the polls, Seacrest and the political Australia here, we have to add our full name, that
means our pool stickiest field name.
So from here, I pass that name as a name.
Right.
So now here you can actually use that.
Sorry.
Here you can use that name.
So if you want to change it, if you want to make that into the user name, you have to do have to put
that our name on here.
So right now there are the multiple field, but I just copied suits will be as a email
email and then it'll be as a password.
And then I make that thing another one that will be an email password and the password.
So just name it as a password.
Also here we have to pass that confirm password that will be as a password.
That is actually our full name as email.
Right.
So there is a password name and then email and the name perfect.
So I just simply added all the Darfield.
So here, first of all, I want to do and actually check it.
First of all, I want to check it out this password and confirm possibly the same.
It not lots of other reasons here.
I want to put you on the bottom of the condition of the if condition, if our password if our password
is equal, equal our confirmed password.
So there is no confirmed password when if so, this is the same.
OK, when it will be same then it'll be pened.
That is here should be lose all that action actually.
So right now and to check it first.
OK, I want to check it like it shall be a display.
Some of the message I write to them is that went into the L.A. ls it will be do another work.
So it's will be uh first on the message.
So with this message I want to actually show it.
So I have already added that message option in your register area.
So here it be, show some of the message and it'll be as obviously error message into the error message
area is to be sure, some of the message better here.
I just pulled one of the message.
I just put one of the messages will be displayed as a password and confirm password,
not match, right.
So when it should be match, then it should be the end of the action.
Aless, to be sure, our this message right now, first of all, I want us to check it here.
I want to check it because of all in the register here.
I already added our message.
So now it should be visible.
So now let's check this out.
If you don't like the Savol and now I want to do I want to refresh this space.
And that is our user name, I put on the user name as a accorsi and put that e-mail address, the Kasie
at the Gmail dot com sorry dot com and put the password and the password.
So our password is taken from password is not matched nor should be displayed on the atomizers nuclear
register.
Yes, you can see friend now showing our message as a password and the password not match.
Right.
So that means our validation is not perfectly working.
So now to do that is our way in our password and the password will be match.
And then before instead this user.
I want to check it.
First of all, I also want to check it.
That means this user is already exist.
It are not in our database.
And also, I want to check it out.
This email is already existed or not.
OK, so that was one of the matter as it exists, exist.
So with this, we can do that work very easily.
So right now that is our we don't need this.
So here I want to do want to put another if condition.
OK, so here after that, I don't want to put another live condition.
If our with of the default on the class of the user, that is the default clause that is user.
And with this user we have to do we have to actually first of all, filter it with this filter means
it will be Saatchi Saatchi database that the user already existed or not.
So for the reasons that we have to do, we have to add our user and then object, OK, with this object,
it will be filter.
So as I told you, this filter should be checked.
And then shall we take our which filter shall we take our user name filled.
That means that user name field is shall we check it.
That means this is already existed or not.
So that have all sort of the metadata exist.
So I just simply added that exist.
OK, so with this existing method it shall be checking.
This user is already in our database subject area.
They have already this user is existed or not.
So shall we check it.
So any use that user also you have to do we have to import it.
So here, here after the from the from and Jianguo from the Django Cantrip and then the old and then
the models from the, the models here from here we have to, we have to import our this user that is
all user class.
OK, so make sure you import it.
So it's very much important because of all here we use it.
Right.
So with this user it shall be it.
That means this if this user obsequiously filter the data in our database table, that means this user
feelies already existed or not so.
Well, it should be existing here.
I want to show some of the message so simple.
I want to do here in particular that position.
So here it should be sure some of the message of the error message in the request area is to be sure
that as the username username already exists.
So this step of one of the messages shall be displayed OK and else.
So I want to do another LC.
So here there is the URLs, if so, with this else, if it shall be the same condition with this user.
I also want to check that all our email field before, as I told you before, friend.
So everything actually in our admin area they have on the table and there is a by default some of the
feel right now.
I have checked our username field and now I want to check out another feel for the email so it'll be
just like the same that the user objects and then it should be filtered.
That means you should be check it.
Right.
So shall we check it right now or before filename as email.
So that is our email.
Email.
This email is what the email actually pass from here right now.
So we should be checking that with our political study milk.
So shall we check it so that you.
Sorry, that will be email.
So shall we check.
So that will be our posted post.
That means this post email field and that is our database field.
OK, that means our admin database field.
That is a follow on as email is.
It should be checked.
This field with this filter is existed or not.
So I just simply added that exist again e exist method.
So we decided this method when it should be checked, if it gets on the same, whether it will be the
email will be the same, then it should be chosen another message.
So here should be should another message, an email already exists I hope is very much clear to your
friend and else else it should be said, is not actually so here in particular, that area that is URLs.
So there is a ls ls is will be actually posteriorly.
So we check all that our feel.
I just take one of the variables as it user and sorry, with this user here, we have to also add that
our user that is with this user class that is objects and with these objects now to create our news
are so they have also another method as a user so that it will create under escort user that is on the
default method.
So it does create user method.
It will be clear that users to win the war for oil have to pass all the door.
Dolphin filename as a user name will be that user name.
Right?
That means that is our database, our default admin user name.
And here I take our fin name and I just take the things with this variable here.
I just simply passed it.
So I also have to do I have to pass our email field and also here we have to pass our password.
Right.
So I just simply pass both of this field.
I should be as username.
Password will be our password, that is our pollsters password and also email.
And then I just simply pass that email.
So I just want to pass it so so be created with our this username password and that email field, all
the data.
And after that I want to do a totally safe that the user.
So I just take all that our object user that is creating a new data, take the things with this variable.
So now with this I want to do save it, OK, I just simply save this data I hope is very much clear
to your friend.
And when will be created that new user, what exactly it should be rejected.
You can also pass on the redacted things from from here says we as it did before.
There is a return direct.
So right now I want to do and use that internally, that equality will be successfully create that new
user.
Uh, well, so we create that news that I want to do and to create a reference to the our specific profile
page.
Right.
So there is a profile in our employee profile that is so far that I have created one of the.
You are also that is our profile, right?
So I want to do and parcel to the return redirect to our profile page.
I have friend.
Every line should be very much clear to you.
OK, I'm aless will be a display over this message.
So I have already checked that validation is not perfectly working.
So, friend, that's all you have to do.
So here now let's check this out now.
I want to actually take it step by step.
Not exactly, because I say, well, first of all, I want to check our server.
Yeah, it's perfectly running.
They have no at all.
Now, I just refresh it better here.
I just refresh it.
So now I'm going to create the user name as a courtesy.
And I just put that email address as a Khasi at the rate Gmail dot com and then put password as you
do me.
One, two, three, four, five.
You do me one, two, three, four, five.
OK, so now if you click on the register, so as it said that things on here when it'll be safe, this
data to be done, redirect to the profile page.
Right.
So now let's check this out if because the register so now showing that, as you said, object has no
attribute as it exists here.
It a spelling mistake.
And I understand you can see that it actually exists.
It's not that exist.
It should be as they exist.
So bitter dispute that again exist, SIEV X other.
OK, so that will be as it exists.
That will be as it exists.
Perfect.
Now, let's check this out with you face and hear.
Don't worry about it, OK, because of all that is the common part for the program.
So I just simply take it.
And now let's do that work again.
I just refresh it.
That is a refreshing.
And now that is I want to turn to Ed Cuzzi because he at the Gmail dot com and then you do me one,
two, three, four, five.
You do me one, two, three, four or five.
So no because the register yes.
You can see it now successfully logged in.
That means created that new user and you can see it's not perfectly adequate to a profile page.
So here I have simply added it when this user will be created, which will be saved, this user, and
then return to the redirect to our profile page.
Right.
So now you can see it's not perfectly adequate to our profile page.
So now from here, if you click the log out and now I want to login with our admin, the easy learning
logging, go to that user.
Yes.
You can see there is a new user is added as a courtesy and also the ports on the name as our email address,
that is our email address is Icaza address Gmail dot com.
And I hope is very much clear to you.
So that is actually talking about that is all that our user name, password, field, first name, last
name and the email address.
OK, so that's all actually the default one.
So here I have used all that, our default on this table, all that field.
OK, so right now I have already exists on the user.
So here you can see there is a clause, all that username that means this user name means, as I told
you, that you use a table that is our user name and that is the same as a password and also that email.
And also here I put some of the validation.
I put the validation.
If this user is already existed, then it'll be show that user name is already exist and also should
be displayed that email the same.
Right.
If this email is already exist, then it should be show our this validation.
So now let's check this out.
I have already created one of the user name.
That means that there are Gmail and the user name as a Karzi.
So now I want to check it again.
Now, if you can go to that register.
So here I put that name as Karzai and Karzai at the rate at Gmail dot com and puts on the password as
you do.
Two, four, five.
You do me one, two, three, four, five.
So now our user name is the same.
So it should be displayed on the outer.
But I want to make the things as the crazy one.
OK, first of all, I want to check that username because the register.
Yes, you can see it's perfectly getting that our validation, that username is already exists.
That means it's automatically redacted to our position.
So into the filter area.
I simply checked it out.
Username feel that means our database username field and our requested user name is shall we check it.
That means we should be checking our database here.
You can see it's already getting that.
Are you the same name that might that mean the same username for the results here.
I just put the message at or should we display our username is already exist and same as for our email
and that is an object you should be checked with this filter.
Email is already existed.
It's not in our database.
And here you can see there is also another field as email address.
So that is one of the filename as email.
So you should be check our request at email.
So now let's check this out.
And now I want to put the name as a Karzi are OK.
And then I put on the same name as a Karzi at the rate Gmail dot com and you do three, four, five
and you do me one, two, three, four, five.
And no, because the register yes.
You can see snow perfectly.
Also getting out this error as email already exists.
That means our this validation is also perfectly working.
OK, and then when everything will be the perfect then it shall be saved.
That message should be created, that new user into the object area, and then it shall be saved.
So, friend, we successfully complete our registration position and now if you want to logging with
our new account.
So from here we have to log out.
I just simply log out and now here I refresh it.
I want to login with the Karzai username and password.
I put the pathology.
You join me.
One, two, three, four, five.
Click the logging.
Maybe some wrong.
That's crazy.
And you do me one, two, three, four, five.
Click as a logging.
Yeah.
You can see so successfully logging and also showing at the logging by Ghazi Ridvan.
So everything is perfectly working.
Click as a log out.
Yeah.
You can see suffering as a successfully log out I.
PRAnd you enjoyed very much, so don't let me step by step will go more deep.
So one of the things you should know in general is step by step.
I will show you everything with the live example.
So thanks for watching and I'll see you in the next video.