Répondre aux sondages à la place des fanfarons #42
2 changed files with 19 additions and 1 deletions
|
@ -3,4 +3,12 @@ from django.contrib import admin
|
||||||
from .models import Event, Participants
|
from .models import Event, Participants
|
||||||
|
|
||||||
# Add event by admin page return a 502 error
|
# Add event by admin page return a 502 error
|
||||||
admin.site.register(Event)
|
class ParticipantsAdmin(admin.ModelAdmin):
|
||||||
|
autocomplete_fields = [ "event", "participant" ]
|
||||||
|
|
||||||
|
class EventAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = [ "nom", "nomcourt", "lieu", "description", "desc_users" ]
|
||||||
|
|
||||||
|
admin.site.register(Event, EventAdmin)
|
||||||
|
admin.site.register(Participants, ParticipantsAdmin)
|
||||||
|
|
||||||
|
|
|
@ -113,9 +113,19 @@ class UserProfileAdmin(UserAdmin):
|
||||||
user.groups.add(chef_group)
|
user.groups.add(chef_group)
|
||||||
user.save()
|
user.save()
|
||||||
|
|
||||||
|
class ErnestoUserAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = [
|
||||||
|
"user__username",
|
||||||
|
"user__first_name",
|
||||||
|
"user__last_name",
|
||||||
|
"phone",
|
||||||
|
"instru",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
admin.site.unregister(User)
|
admin.site.unregister(User)
|
||||||
admin.site.register(User, UserProfileAdmin)
|
admin.site.register(User, UserProfileAdmin)
|
||||||
|
admin.site.register(ErnestoUser, ErnestoUserAdmin)
|
||||||
admin.site.register(VideoGallery)
|
admin.site.register(VideoGallery)
|
||||||
admin.site.register(Photo)
|
admin.site.register(Photo)
|
||||||
admin.site.register(Actu)
|
admin.site.register(Actu)
|
||||||
|
|
Loading…
Reference in a new issue