This commit is contained in:
Maurice Debray 2022-02-26 12:44:47 +01:00
parent f8b96586db
commit 84af71a6c7
2 changed files with 7 additions and 4 deletions

View file

@ -2,13 +2,15 @@ from django.contrib import admin
from .models import Event, Participants
# Add event by admin page return a 502 error
class ParticipantsAdmin(admin.ModelAdmin):
autocomplete_fields = [ "event", "participant" ]
autocomplete_fields = ["event", "participant"]
class EventAdmin(admin.ModelAdmin):
search_fields = [ "nom", "nomcourt", "lieu", "description", "desc_users" ]
search_fields = ["nom", "nomcourt", "lieu", "description", "desc_users"]
admin.site.register(Event, EventAdmin)
admin.site.register(Participants, ParticipantsAdmin)

View file

@ -113,8 +113,9 @@ class UserProfileAdmin(UserAdmin):
user.groups.add(chef_group)
user.save()
class ErnestoUserAdmin(admin.ModelAdmin):
search_fields = [
search_fields = [
"user__username",
"user__first_name",
"user__last_name",