# Admin backends

* disables certain admin backends
* adds proper ordering to server message admin overview
This commit is contained in:
mpeltriaux 2024-04-03 08:29:19 +02:00
parent 09546212b9
commit 04dc7fcd30
4 changed files with 6 additions and 2 deletions

View File

@ -148,7 +148,7 @@ class CompensationActionAdmin(admin.ModelAdmin):
admin.site.register(Compensation, CompensationAdmin)
admin.site.register(EcoAccount, EcoAccountAdmin)
admin.site.register(EcoAccountDeduction, EcoAccountDeductionAdmin)
#admin.site.register(EcoAccountDeduction, EcoAccountDeductionAdmin)
# For a more cleaner admin interface these rarely used admin views are not important for deployment
#admin.site.register(Payment, PaymentAdmin)

View File

@ -16,4 +16,5 @@ class EmaAdmin(AbstractCompensationAdmin):
"teams",
]
admin.site.register(Ema, EmaAdmin)

View File

@ -151,7 +151,7 @@ class ResubmissionAdmin(BaseResourceAdmin):
# Outcommented for a cleaner admin backend on production
admin.site.register(Geometry, GeometryAdmin)
#admin.site.register(Geometry, GeometryAdmin)
#admin.site.register(Parcel, ParcelAdmin)
#admin.site.register(District, DistrictAdmin)
#admin.site.register(Municipal, MunicipalAdmin)

View File

@ -17,6 +17,9 @@ class ServerMessageAdmin(admin.ModelAdmin):
search_fields = [
"subject"
]
ordering = [
"-publish_on"
]
def save_model(self, request, obj, form, change):
obj.save(user=request.user)