Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 1
    You should not do that! You can only have one AUTH_USER_MODEL system-wide. Better use the default User as the user model and make Student and Teacher common models with a OneToOneField to User. You might wanna read these docs. In your case, extending is definitely better than substituting. Commented Jan 23, 2018 at 9:35
  • one way to do this is you can implement two signup form one for Student and another for Teacher using model form and then according to request you can render the right form in view. Commented Jan 23, 2018 at 9:36
  • @schwobaseggl I did that, but my users dont get saved as teachers or students. Here is my code: pastebin.com/syXh2Wn4 Commented Jan 23, 2018 at 10:24
  • @DannM You would have to manually populate the profile models in the form's save. The form doesn't do that because its model is User Commented Jan 23, 2018 at 10:27
  • @schwobaseggl can u show me how ? Commented Jan 23, 2018 at 10:42