Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django import forms
- from registration.forms import RegistrationFormUniqueEmail
- from app.models import CustomUserPhone
- class RegistrationFormUniqueEmailWithPhone(RegistrationFormUniqueEmail):
- phone = forms.CharField(max_length=20)
- def save(self, *args, **kwargs):
- data = self.cleaned_data
- CustomUserPhone.objects.create(phone = data['phone'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement