mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-26 19:02:23 +00:00
Add missing models in Django Admin
This commit is contained in:
parent
1a63c1f399
commit
fd4280426b
@ -4,7 +4,7 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from .models import Participation, Pool, Solution, Synthesis, Team, Tournament
|
from .models import Participation, Passage, Pool, Solution, Synthesis, Team, Tournament
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Team)
|
@admin.register(Team)
|
||||||
@ -31,6 +31,11 @@ class PoolAdmin(admin.ModelAdmin):
|
|||||||
search_fields = ('participations__team__name', 'participations__team__trigram',)
|
search_fields = ('participations__team__name', 'participations__team__trigram',)
|
||||||
|
|
||||||
|
|
||||||
|
@admin.register(Passage)
|
||||||
|
class PassageAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ('pool__participations__team__name', 'pool__participations__team__trigram',)
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Solution)
|
@admin.register(Solution)
|
||||||
class SolutionAdmin(admin.ModelAdmin):
|
class SolutionAdmin(admin.ModelAdmin):
|
||||||
list_display = ('participation',)
|
list_display = ('participation',)
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from django.contrib.admin import ModelAdmin
|
||||||
from polymorphic.admin import PolymorphicChildModelAdmin, PolymorphicParentModelAdmin
|
from polymorphic.admin import PolymorphicChildModelAdmin, PolymorphicParentModelAdmin
|
||||||
|
|
||||||
from .models import AdminRegistration, CoachRegistration, Registration, StudentRegistration
|
from .models import AdminRegistration, CoachRegistration, Payment, Registration, StudentRegistration
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Registration)
|
@admin.register(Registration)
|
||||||
@ -27,3 +28,10 @@ class CoachRegistrationAdmin(PolymorphicChildModelAdmin):
|
|||||||
@admin.register(AdminRegistration)
|
@admin.register(AdminRegistration)
|
||||||
class AdminRegistrationAdmin(PolymorphicChildModelAdmin):
|
class AdminRegistrationAdmin(PolymorphicChildModelAdmin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@admin.register(Payment)
|
||||||
|
class PaymentAdmin(ModelAdmin):
|
||||||
|
list_display = ('registration', 'type', 'valid', )
|
||||||
|
search_fields = ('registration__user__last_name', 'registration__user__first_name', 'registration__user__email',)
|
||||||
|
list_filter = ('type', 'valid',)
|
||||||
|
Loading…
Reference in New Issue
Block a user