Inline Osoby do Řešitele (v adminu)

This commit is contained in:
Jonas Havelka 2021-09-16 12:35:29 +02:00
parent 54fadf9d4a
commit c58217ccaa

View file

@ -136,11 +136,16 @@ class OsobaAdmin(admin.ModelAdmin):
@admin.register(m.Organizator)
class OrganizatorAdmin(admin.ModelAdmin):
search_fields = ['osoba__jmeno', 'osoba__prijmeni', 'osoba__prezdivka']
class OsobaInline(admin.TabularInline):
model = m.Osoba
@admin.register(m.Resitel)
class ResitelAdmin(admin.ModelAdmin):
class ResitelAdmin(ReverseModelAdmin):
search_fields = ['osoba__jmeno', 'osoba__prijmeni', 'osoba__prezdivka']
ordering = ('osoba__jmeno','osoba__prijmeni')
inline_type = 'stacked'
inline_reverse = ['osoba']
@admin.register(m.Problem)
class ProblemAdmin(PolymorphicParentModelAdmin):