from django.contrib import admin 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 admin.site.register(Event) admin.site.register(Participants, ParticipantsAdmin)