#99 Admin backend cleanup

* removes admin backend views which are not important for production
* adds filtering functionalities on index views
* simplifies detail views on intervention, compensation, ecoaccount and ema
* adds autocomplete fields on detail views
* adds handy horizontal filter fields on detail views
This commit is contained in:
2022-02-01 18:41:02 +01:00
parent c4c36d27a2
commit b0f3505972
14 changed files with 243 additions and 60 deletions

View File

@@ -4,11 +4,23 @@ from news.models import ServerMessage
class ServerMessageAdmin(admin.ModelAdmin):
readonly_fields = [
"modified",
"created",
]
list_display = [
"id",
"subject",
"publish_on",
"is_active",
]
search_fields = [
"subject"
]
def save_model(self, request, obj, form, change):
obj.save(user=request.user)
admin.site.register(ServerMessage, ServerMessageAdmin)