Fix merge
This commit is contained in:
parent
f5570bdf6b
commit
bea7399fe2
4 changed files with 14 additions and 5 deletions
|
@ -15,4 +15,6 @@ urlpatterns = [
|
||||||
path('org/reseni/<int:pk>', org_required(viewMethodSwitch(get=views.DetailReseniView.as_view(), post=views.hodnoceniReseniView)), name='odevzdavatko_detail_reseni'),
|
path('org/reseni/<int:pk>', org_required(viewMethodSwitch(get=views.DetailReseniView.as_view(), post=views.hodnoceniReseniView)), name='odevzdavatko_detail_reseni'),
|
||||||
path('org/reseni/all', org_required(views.SeznamReseniView.as_view())),
|
path('org/reseni/all', org_required(views.SeznamReseniView.as_view())),
|
||||||
path('org/reseni/akt', org_required(views.SeznamAktualnichReseniView.as_view())),
|
path('org/reseni/akt', org_required(views.SeznamAktualnichReseniView.as_view())),
|
||||||
|
|
||||||
|
path('resitel/reseni/<int:pk>', resitel_or_org_required(views.ResitelReseniView.as_view()), name='odevzdavatko_resitel_reseni'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -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']
|
||||||
|
|
|
@ -72,7 +72,12 @@ class Rocnik(SeminarModelBase):
|
||||||
return len(self.verejna_cisla()) > 0
|
return len(self.verejna_cisla()) > 0
|
||||||
verejne.boolean = True
|
verejne.boolean = True
|
||||||
verejne.short_description = 'Veřejný (jen dle čísel)'
|
verejne.short_description = 'Veřejný (jen dle čísel)'
|
||||||
|
|
||||||
|
def neverejna_cisla(self):
|
||||||
|
vc = [c for c in self.cisla.all() if not c.verejne()]
|
||||||
|
vc.sort(key=lambda c: c.poradi)
|
||||||
|
return vc
|
||||||
|
|
||||||
def verejna_cisla(self):
|
def verejna_cisla(self):
|
||||||
vc = [c for c in self.cisla.all() if c.verejne()]
|
vc = [c for c in self.cisla.all() if c.verejne()]
|
||||||
vc.sort(key=lambda c: c.poradi)
|
vc.sort(key=lambda c: c.poradi)
|
||||||
|
|
Loading…
Reference in a new issue