|
|
@ -76,11 +76,20 @@ def create_modeladmin(modeladmin, model, name = None, verbose_name = None, verbo |
|
|
|
|
|
|
|
class ResitelInline(admin.TabularInline): |
|
|
|
model = Resitel |
|
|
|
fields = ['jmeno', 'prijmeni', 'skola', 'mesto', 'rok_maturity', ] |
|
|
|
readonly_fields = ['jmeno', 'prijmeni', 'skola', 'mesto', 'rok_maturity', ] |
|
|
|
fields = ['osoba_jmeno', 'osoba_prijmeni', 'skola', 'osoba_mesto', 'rok_maturity', ] |
|
|
|
readonly_fields = ['osoba_jmeno', 'osoba_prijmeni', 'skola', 'osoba_mesto', 'rok_maturity', ] |
|
|
|
extra = 0 |
|
|
|
view_on_site = False |
|
|
|
|
|
|
|
def osoba_jmeno(self, obj): |
|
|
|
return obj.osoba.jmeno |
|
|
|
|
|
|
|
def osoba_prijmeni(self, obj): |
|
|
|
return obj.osoba.prijmeni |
|
|
|
|
|
|
|
def osoba_mesto(self, obj): |
|
|
|
return obj.osoba.mesto |
|
|
|
|
|
|
|
def has_add_permission(self, req): return False |
|
|
|
|
|
|
|
|
|
|
|