1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-26 08:22:21 +00:00
plateforme-tfjm2/apps/member/admin.py
Yohann D'ANELLO 264f2b7e6b Index page
2020-04-29 07:39:52 +02:00

40 lines
999 B
Python

from django.contrib.auth.admin import admin, UserAdmin
from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin
from member.models import TFJMUser, Document, Solution, Synthesis, MotivationLetter, Authorization, Config
@admin.register(TFJMUser)
class TFJMUserAdmin(UserAdmin):
list_display = ('email', 'first_name', 'last_name', 'role', )
@admin.register(Document)
class DocumentAdmin(PolymorphicParentModelAdmin):
child_models = (Authorization, MotivationLetter, Solution, Synthesis,)
polymorphic_list = True
@admin.register(Authorization)
class AuthorizationAdmin(PolymorphicChildModelAdmin):
pass
@admin.register(MotivationLetter)
class MotivationLetterAdmin(PolymorphicChildModelAdmin):
pass
@admin.register(Solution)
class SolutionAdmin(PolymorphicChildModelAdmin):
pass
@admin.register(Synthesis)
class SynthesisAdmin(PolymorphicChildModelAdmin):
pass
@admin.register(Config)
class ConfigAdmin(admin.ModelAdmin):
pass