Extend your Django custom model with custom fields, recipients, and a backend

I am developing a Django application (v1.6) and should perform several actions with users:

  • Add custom fields, such as a foreign key for the user department
  • Changes to the Trigger database when certain fields change. For example, when the user department changes, I need to move the inventory to another model from the old department and to the new one. I planned to use the pre_save receiver for this.
  • Define user permissions, for example, a user can only change rows in a table associated with their department.
  • In the end, I want to integrate the application with our Active Directory server for authentication.

I looked through the options in the documentation and I see that there are several options: from extending the user model through mutual access, to writing the user model of the user.

Which design should be used to meet all of the above goals?

+4
source share
2 answers

Take a look at this blog post: it provides all the principles of design to achieve your goals. http://www.roguelynn.com/words/django-custom-user-models/

, : http://procrastinatingdev.com/django/using-configurable-user-models-in-django-1-5/

+2

Source: https://habr.com/ru/post/1524544/


All Articles