mpeltriaux
5b0b376405
* 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
18 lines
375 B
Python
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)
|