unfoldadmin / django-unfold

Modern Django admin theme for seamless interface development
https://unfoldadmin.com
MIT License
1.93k stars 187 forks source link

New setting to show `DEBUG` badge #821

Closed Zerotask closed 1 week ago

Zerotask commented 1 month ago

image

Is it a third party application feature request?

No

Describe your feature request

New setting to display a DEBUG badge. Example:

"SHOW_DEBUG": False, # show/hide "Debug" badge, default: False

Alternatively it could be a callback function or instead of a boolean, it could be: None | "info" | "danger" | "warning" | "success" and by default it's None (or empty string), so the current behavior won't change:

"SHOW_DEBUG": None, # show/hide "Debug" badge, default: None. Can be info, danger, warning, success
lukasvinclav commented 1 week ago

You can display this information inside the original badge for example like: STAGING/DEBUG. Another badge will take more space in already small area which will make it harder to optimise for mobile devices. Thanks for understanding.