konova/ema/admin.py
mpeltriaux 14fee4474f #229 Shared users mandatory on admin
* changes mandatory state of users and teams on admin backend to optional (as expected by the model)
* adds team selection to admin backend
2022-11-16 13:27:57 +01:00

20 lines
415 B
Python

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