konova/ema/admin.py
mpeltriaux 5b0b376405 #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
2022-02-01 18:41:02 +01:00

18 lines
375 B
Python

from django.contrib import admin
from compensation.admin import AbstractCompensationAdmin
from ema.models import Ema
class EmaAdmin(AbstractCompensationAdmin):
filter_horizontal = [
"users"
]
def get_fields(self, request, obj=None):
return super().get_fields(request, obj) + [
"users"
]
admin.site.register(Ema, EmaAdmin)