#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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user