Implementation of view permission in Django admin

33 views
Skip to first unread message

Gagan Deep

unread,
Jan 4, 2022, 5:42:28 AM1/4/22
to Django developers (Contributions to Django itself)

Hello everyone! 


I have been looking into the implementation of ModelAdmin and how it processes the view only permission. While rendering a ModelAdmin for a user with view-only permission, the ModelAdmin disregard widget defined for the field and uses the AdminReadonlyField to display the information. 


This implementation makes it difficult to customize the rendering of the object information. An example use case is rendering map for GeoJSON coordinates in django-lealet


I have already read discussions in https://code.djangoproject.com/ticket/17295 ticket and also checked related discussions on this mailing list. I couldn't find a discussion on how ModelAdmins that use custom forms (or widgets for fields) could be supported for view-only permission. 


Will adding support for customizing the rendering of ModelAdmin for users with view-only permissions be useful for Django? 


Best, 

Gagan Deep 

Reply all
Reply to author
Forward
0 new messages