|
@ -30,13 +30,15 @@ class OsobaAdmin(admin.ModelAdmin): |
|
|
org.save() |
|
|
org.save() |
|
|
udelej_orgem.short_description = "Udělej vybraných osob organizátory" |
|
|
udelej_orgem.short_description = "Udělej vybraných osob organizátory" |
|
|
|
|
|
|
|
|
@admin.register(m.Organizator) |
|
|
|
|
|
class OrganizatorAdmin(admin.ModelAdmin): |
|
|
|
|
|
search_fields = ['osoba__jmeno', 'osoba__prijmeni', 'osoba__prezdivka'] |
|
|
|
|
|
|
|
|
|
|
|
class OsobaInline(admin.TabularInline): |
|
|
class OsobaInline(admin.TabularInline): |
|
|
model = m.Osoba |
|
|
model = m.Osoba |
|
|
|
|
|
|
|
|
|
|
|
@admin.register(m.Organizator) |
|
|
|
|
|
class OrganizatorAdmin(ReverseModelAdmin): |
|
|
|
|
|
search_fields = ['osoba__jmeno', 'osoba__prijmeni', 'osoba__prezdivka'] |
|
|
|
|
|
inline_type = 'stacked' |
|
|
|
|
|
inline_reverse = ['osoba'] |
|
|
|
|
|
|
|
|
@admin.register(m.Resitel) |
|
|
@admin.register(m.Resitel) |
|
|
class ResitelAdmin(ReverseModelAdmin): |
|
|
class ResitelAdmin(ReverseModelAdmin): |
|
|
search_fields = ['osoba__jmeno', 'osoba__prijmeni', 'osoba__prezdivka'] |
|
|
search_fields = ['osoba__jmeno', 'osoba__prijmeni', 'osoba__prezdivka'] |
|
|