I have a custom UserProfile:
class UserProfile(models.Model):
BUYER_USER = 1
CLIENT_USER = 2
ARTIST_USER = 3
ADMIN_USER = 3
USER_CHOICES = (
(BUYER_USER, 'Buyer'),
(CLIENT_USER, 'Client'),
(ARTIST_USER, 'Artist'),
(ADMIN_USER, 'Admin'),
)
# This field is required.
user = models.OneToOneField(User)
usertype = models.IntegerField(choices=USER_CHOICES, default=BUYER_USER)
dob = models.DateField(blank=True, null=True)
address = models.TextField(max_length=8, blank=True, null=True)
I am using django-registration-redux
to manage accounts. The built-in registration view has following layout:
But I would like to move to the following layout:
I know how to change the template and adapt the layout for the fields related to the User
model, but I do not know how to tell django-registration-redux
to populate the UserProfile
based on the data entered in the RegistrationView
form.
Is this at all possible? How?