From fad2c6940d6a2b755702d457753b8faa746a54e3 Mon Sep 17 00:00:00 2001 From: ticvac Date: Sat, 15 Jun 2024 23:20:35 +0200 Subject: [PATCH] =?UTF-8?q?oprava=20chybov=C3=A9=20hl=C3=A1=C5=A1ky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- personalni/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/personalni/admin.py b/personalni/admin.py index ecb59674..e86898db 100644 --- a/personalni/admin.py +++ b/personalni/admin.py @@ -21,7 +21,8 @@ def sjednot_telefony(admin, request, queryset): else: raise ValueError except: - print("Hmm má divné číslo - " + o.telefon + " - " + str(o.id)) + admin.message_user(request, f"{o.jmeno} {o.prijmeni} (id: {o.id}) má divný telefon: {o.telefon}", level=ERROR) + admin.message_user(request, "Telefony sjednoceny.", level=SUCCESS) # Tohle chceme umět použít i z ResitelAdmin @admin.action(description="Udělej z vybraných osob organizátory")