hierarchical data - Extending django User model using Django-mppt -


i have hierarchical structure in sense there can company , user, company can nested within company while users can independent or belong company. there documentation on how use django user model in conjunction django-mptt package?

django documentation: customizing authentication in django recommends following options :

there 2 ways extend default user model without substituting own model. if changes need purely behavioral, , don’t require change stored in database, can create proxy model based on user. allows of features offered proxy models including default ordering, custom managers, or custom model methods.

if wish store information related user, can use one-to-one relationship model containing fields additional information. one-to-one model called profile model, might store non-auth related information site user.

some kinds of projects may have authentication requirements django’s built-in user model not appropriate. instance, on sites makes more sense use email address identification token instead of username.

both of above may inherit mpttmodel , solve problem. recommend first approach being simpler, , sounds me enough describe, again depends on particular future requirements.


Comments