From 84af71a6c7d817ae66ad17a236d8cc7e56349f24 Mon Sep 17 00:00:00 2001 From: Maurice Debray Date: Sat, 26 Feb 2022 12:44:47 +0100 Subject: [PATCH] linting --- calendrier/admin.py | 8 +++++--- gestion/admin.py | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/calendrier/admin.py b/calendrier/admin.py index fdfbf43..f48de3f 100644 --- a/calendrier/admin.py +++ b/calendrier/admin.py @@ -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) - diff --git a/gestion/admin.py b/gestion/admin.py index 322896c..be35fd7 100644 --- a/gestion/admin.py +++ b/gestion/admin.py @@ -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",