Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Registration Form Fields
#1
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.
Reply
#2
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.
- Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. Albert Einstein
Reply
#3
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()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Selenium fields containing a word graham23s 3 2,781 Aug-22-2023, 12:35 PM
Last Post: Gaurav_Kumar
  I am trying to space the registration forms using css. But it is not working. tree 0 1,380 Apr-11-2021, 03:31 AM
Last Post: tree
  Django REST - input of some form fields is send twice to the backend ann 4 3,942 Jan-03-2018, 05:43 PM
Last Post: ann
  Django allauth saving custom user profile fields with signup form prithvi 1 10,463 Aug-08-2017, 03:51 PM
Last Post: prithvi

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020