Python Forum

Full Version: Registration Form Fields
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

In django there are 3 fields for registration form which are username, password1 and password2.

Here is what I need:

1. After registration I need the user to br assigned as a staff member.
2. Is there a way to add name and email to the registration form?
3. If answer is yes to question 2, how to use them to be filled in other table called customers?

Thanks.
I think Corey Schafer already has a good tutorial for user profiles in Django: https://www.youtube.com/watch?v=FdVuKt_i...4p&index=8. If I remember correctly, he added data to the standard available database table, or created a new table for it. Not sure how in detail, but one way other other you can create your own data, which you can use your own way. There will probably also a way to edit the standard login form. But I have no experience with it. Perhaps he will also go over that topic.
user = User.objects.create_user(user=request.POST['user'], password=request.POST['password1'])
user.first_name = request.POST['first_name']
user.last_name = request.POST['last_name']
user.save()