django-csp-reports icon indicating copy to clipboard operation
django-csp-reports copied to clipboard

Improved admin usability

Open Bartvaderkin opened this issue 3 years ago • 2 comments

I did a few updates to make the admin slightly nicer to use.

  • Disabled add/change
  • Fixed JSON rendering
  • Added search, date_hierarchy and filter to list view
  • Added is_valid field to list view

Also set the model name so the casing is better in menus and translatable

Fixes part of #25

Bartvaderkin avatar Oct 08 '21 16:10 Bartvaderkin

Thanks.

Does the addition of the has_add_permission and has_change_permission methods mean that all reports become uneditable in the admin and you can't add new ones? I can see that that makes a lot of sense, but I'm not sure whether enforcing it as the default is necessarily what we want to do 🤔 . I would be tempted to just leave that up to the developer of a project, and leave the defaults to be less restrictive. But I'm on the fence about it.

Convince me? 😀

adamalton avatar Oct 10 '21 17:10 adamalton

As this is a logging module for reporting purposes I thought it'd be unlikely you'd add or modify records.

Bartvaderkin avatar Oct 14 '21 09:10 Bartvaderkin