2

I'm developing an application with the user default authentication provided by Django (and django-registration-redux). Also in docs, they recommend to link the user profile with a OneToOneField in a different model,as explain here: https://docs.djangoproject.com/en/1.10/topics/auth/customizing/

The problem is: How to build a registration view that includes the profile form?

Note that it's only creating a user account with the basic data without profile info. I already have worked in other project inheriting from AbstractUser and customizing User Model but I would like this time use Profile model

Can you help me?

jonango
  • 197
  • 1
  • 9

1 Answers1

2

The problem is: How to build a registration view that includes the profile form?

The short answer is don't do this.

You've probably signed up on hundreds of sites yourself. Did they ask you for this information at registraion? nopes. Because it's not user fiendly. The profile creation should be separated from registration.

If you really want to gather this information you need to replace the default user registration form with your own. AFAIK there isn't a setting in django-registration-redux to change the default form. So you will have to customize the view as well. So a lot of hard work for a little gain.

Note that it's only creating a user account with the basic data without profile info

Which is exactly how it should be.

e4c5
  • 52,766
  • 11
  • 101
  • 134
  • 1
    You're totally right... However in my case this is not intended to a "self-registration" but a registration performed by an admin... So I need to capture all this info when a user is being registered. Maybe are there any way better to perform this? Thank you so much. – jonango Feb 20 '17 at 00:34
  • Well... Finally I replaced the default user registration for that so your answer is correct – jonango Feb 21 '17 at 15:40
  • glad to have helped – e4c5 Feb 21 '17 at 15:56