django-admin-actions

Django Admin - Allow models to be shown for is_staff users

删除回忆录丶 提交于 2021-02-08 21:41:08
问题 I need to make some Django models available for is_staff=True users in the Django admin interface. I do not want to go for each user and assign them permissions or group permissions to the staff users. Which method do I need to override in ModelAdmin or BaseModelAdmin class or is there any other simpler way? I am using Django 1.4 Version 回答1: class TeacherAdmin(admin.ModelAdmin): def has_add_permission(self, request): return True def has_change_permission(self, request, obj=None): return True

How to Change the Django 3.1.3 Admin View

房东的猫 提交于 2021-01-07 06:37:50
问题 I am currently working on the Django==3.1.3 version but would like to change the interface like that of the django==3.1 Admin view. The current view looks something like this: I would like to remove the red part and keep the remaining part of the page. 来源: https://stackoverflow.com/questions/65020639/how-to-change-the-django-3-1-3-admin-view

How to Change the Django 3.1.3 Admin View

三世轮回 提交于 2021-01-07 06:36:08
问题 I am currently working on the Django==3.1.3 version but would like to change the interface like that of the django==3.1 Admin view. The current view looks something like this: I would like to remove the red part and keep the remaining part of the page. 来源: https://stackoverflow.com/questions/65020639/how-to-change-the-django-3-1-3-admin-view