1

I'm a bit confused. i wanted to extend django User to customize it and i know that the preferred way is to put OneToOneField in customized user to relate it to django User. but the problem is we can also make the customized user to inherit from django User instead of having OneToOneField. My question here is, does inheritance approach have problems ?! and what is the benefits of OneToOneField over inheritance(if it has !) !?

(by the way, I've seen this link, but there was no explanation for benefits of these approaches)

note: it's not duplicate! in this link, the writer of question said "I don't want to know why to use one or another, but what happens under the hoods. What's the difference?", but my question is exactly the first part, "I want to know why to use one or another" or in another words what is the pros and cons of these approaches.

Community
  • 1
  • 1
Hes4m
  • 11
  • 3

0 Answers0