From e2edab52f873dc080f11d82f94059102d84914c6 Mon Sep 17 00:00:00 2001 From: "Bc. Petr Pecha" Date: Sun, 5 Jul 2015 10:21:19 +0200 Subject: [PATCH] organizatori | admin | oprava zobrazovani "" navic --- seminar/admin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/seminar/admin.py b/seminar/admin.py index 6a491766..738225a1 100644 --- a/seminar/admin.py +++ b/seminar/admin.py @@ -348,8 +348,11 @@ admin.site.register(Novinky, NovinkyAdmin) def jmeno_organizatora(obj): ''' vraci jmeno organizatora ''' - return ('%s \"%s\" %s' % - (obj.user.first_name, obj.prezdivka, obj.user.last_name)) + jmeno = obj.user.first_name + if obj.prezdivka: + jmeno = jmeno + ' "' + obj.prezdivka + '"' + jmeno = jmeno + ' ' + obj.user.last_name + return jmeno jmeno_organizatora.short_description = 'Jméno organizátora' def je_organizator_aktivni(obj):