mpeltriaux
83137f0e58
* changes mandatory state of users and teams on admin backend to optional (as expected by the model) * adds team selection to admin backend
20 lines
415 B
Python
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)
|