Django 1.11 User registration

preview_player
Показать описание
In this video i'll create user registration from scratch using Django generic class based views .
Рекомендации по теме
Комментарии
Автор

Thank's mate, perfect explanation no extra talking

skalippanbalippan
Автор

Please make more videos, i had been stuck in this reg thing, this short video solved it, please grow your uploads on django, there are lot of thirsty django learners.. Cheers..

unicornsdesk
Автор

Your tutorials are short, and to the point and you really did a job well done on explaining these! thank you!

But i have one problem that i'd like to point out for future video. You were using pycharm which is why you didn't had to manually import things like HttpResponse or views etc they were done automatically but a person like me using sublime has to manually import them. I knew this that is why i didn't ran into any import errors but any beginners or someone who doesn't know pycharm will usually scratch their heads after watching this tutorial because the only place they went wrong was they didn't import the necessary files!

Hope you understood my problem! Once again awesome tutorial!!! I"m binge watching all your videos

infotakeaway
Автор

he teaches as if, he is the only one who us refering the tutorial

as
Автор

thank you for your tutorials. very good tuto. i'm waiting for more about django.

lilhaitian
Автор

it's showing Name Errror: "User is not defined".
what's exact problem with me?, please reply

brokensoul
Автор

I am not sure why are you doing it this way!!! Why do not you use UserCreationForm which is build in Django.
from django.contrib.auth.forms import UserCreationForm and use it as your form. This way you do not have to check passwords or other cleaned data since django takes care of it and also of all validation process. It also creates User object after posting and validating data from the form to the db.

But I guess, you are doing that because you are adding email field. However, I believe that you can customize the UserCreationForm fields too to accept email.

def save(self, commit=True):
user = super(RegisterUserForm, self).save(commit=False)
user.email = self.cleaned_data["email"]
if commit:
user.save()
return user

Anyway: What if I do not want ti use username field in registration process. I need a form which contains email + password1 + password2 and that is all. This way you have to generate a random username or generate it based on the user email, save it in User model and complete registration.

Can you explain this and how using a video tutorial?

WaelSalman