ernestophone.ens.fr/calendrier/admin.py

13 lines
528 B
Python
Raw Normal View History

2021-08-09 12:41:44 +02:00
from django.contrib import admin
2021-10-23 11:16:07 +02:00
from .models import Event, Participants
class ParticipantsAdmin(admin.ModelAdmin):
fields = ["event", "participant", "reponse", "instrument", "instrument_autre", "dont_play_main", "details", "creationDate", "updateDate" ]
readonly_fields = [ "creationDate", "updateDate" ]
list_display = ["participant", "event", "reponse", "creationDate", "updateDate" ]
# Add event by admin page return a 502 error
2021-08-09 12:41:44 +02:00
admin.site.register(Event)
admin.site.register(Participants, ParticipantsAdmin)