(SORRY FOR BAD ENG)
When i make custom form (forms.py)

```
class UserRegisterForm(UserCreationForm):
email = forms.EmailField(required=True, label='Email')
first_name = forms.CharField(required=True, label='First name', max_length=100)
last_name = forms.CharField(required=True, label='Last name', max_length=100)

class Meta(UserCreationForm.Meta):
    model = User
    fields = ["username", "first_name", "last_name", "email", "password1", "password2"]

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

    def clean_email(self):
        if User.objects.filter(email=self.cleaned_data['email']).exists():
            raise ValidationError(self.fields['email'].error_messages['exists'])
        return self.cleaned_data['email']

```

Here is my views

```
def register(request):
if request.method == 'POST':
    form = UserRegisterForm(request.POST)
    if form.is_valid():
        form.save()
        username = form.cleaned_data['username']
        password = form.cleaned_data['password1']
        user = authenticate(username=username, password=password)
        user.save()
        login(user)
        return redirect('/index/')
else: form = UserRegisterForm()

def login(request):
context = dict()
return render(request, "dashboard/login.html", context)

def register(request):
if request.method == 'POST':
    form = UserRegisterForm(request.POST)
    if form.is_valid():
        form.save()
        username = form.cleaned_data['username']
        password = form.cleaned_data['password1']
        user = authenticate(username=username, password=password)
        user.save()
        login(user)
        return redirect('/index/')
else: form = UserRegisterForm()

context = {'form':form}
return render(request, 'dashboard/register.html', context)

def dashboard(request):

    return render(request, "dashboard/dashboard.html")

```

Django returnig me "AttributeError at /register/
'User' object has no attribute 'META'"
idk why?
I'd like to keep the sequence
How to fix this?

Write where I was wrong