Opened 14 years ago

Closed 14 years ago

#14839 closed (invalid)

django admin and user model inheritance

Reported by: anonymous Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: lists@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you extend the User model using inheritance for example:

class UserInfo(User):

....

if you give the delete permission on the UserInfo class you aren't able to delete a "UserInfo" object since you haven't the "can delete user object".

From a functional point of view if I extend the "User" class I want to see in the admin only the extended class and not the original "User" class so the delete permission on the "User" objects should be implicit if I give the delete permission on the UserInfo object.

Change History (1)

in reply to:  description comment:1 by Julien Phalip, 14 years ago

Resolution: invalid
Status: newclosed

Replying to anonymous:

From a functional point of view if I extend the "User" class I want to see in the admin only the extended class and not the original "User" class so the delete permission on the "User" objects should be implicit if I give the delete permission on the UserInfo object.

Thanks for your suggestion. While this might be an interesting use case, this is not how inheritance and permissions are designed to work in Django. It seems that what you want to achieve could reasonably easily be done with a customised ModelAdmin class. If you need any help about this, I suggest you ask on the django user mailing list: http://groups.google.com/group/django-users/topics

Note: See TracTickets for help on using tickets.
Back to Top