Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django admin action-select checkbox removal?

Tags:

django-admin

Pretty simple question. I have removed the top select-box, for choosing an action to perform on the selected models. However, the leftmost checkbox does not disappear, even though I have no action toolbar neither in top or in bottom.

This is very annoying, as it looks as if it is a field for the given model, just without any headline. See image below... Which has only two attributes - Description and CurrentSeason.

annoying checkbox

I hope someone can help me remove this checkbox!

like image 731
Hoof Avatar asked Dec 12 '22 11:12

Hoof


1 Answers

If you had removed the actions drop down list by settings your ModelAdmin's actions to None, the action_checkbox should've been removed as well.

class SeasonAdmin(admin.ModelAdmin):
    actions = None

Here is the doc link: https://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/#disabling-all-actions-for-a-particular-modeladmin

like image 183
melon Avatar answered Jan 18 '23 20:01

melon