Question

I have decided to move a project from PHP to Python and despite hours of searching, I cannot find a way to implement the following design. I have attempted extending the user class and doing customised Admin Sites but not really got anywhere useful.

I have at the root level, myself. I manage 'clients', who themselves manage 'customers'. The customers control a kind of detailed survey, in which users and invitees take part.

An example of the rough design:

  • ME (Super User)
    • Clients
      • Customers
      • Survey Collections
        • Users
          • Invitees
        • Surveys
          • Invitees (invitee is a child of both survey and user)
        • Questions
        • Etc

I am unsure of the best implementation style. I like the django admin interface, but I would need clients to only be able to modify THEIR customers, surveysets etc, customers to only manage their own surveysets and so on.

Is there a way to implement this in Django, perhaps by doing customised user types via inheritance and assigning them custom Admin Sites?

I understand it may be easier to just make my own apps to manage the various 'admin' interfaces, in which case is there an easy way to manage separate authentication of these user types and their various admin-style management systems?

Was it helpful?

Solution

The closest I got to this was based on How to have 2 different admin sites in a Django project? and is related to another question I asked: seperate 'admin' interfaces for different user types in django

I ended up creating two seperate instances of django admin and each one had it's own validation which was applied to filters on models and CRUD actions shared between them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top