Browse Source

Merge branch 'test'

middleware_test v1.10
LEdoian 6 years ago
parent
commit
743d8056da
  1. 3
      .gitignore
  2. 9
      Makefile
  3. 22
      korektury/templates/korektury/opraf.html
  4. 2
      korektury/templates/korektury/seznam.html
  5. 4
      mamweb/admin.py
  6. 1
      mamweb/settings_common.py
  7. 9
      mamweb/settings_local.py
  8. 2
      mamweb/settings_prod.py
  9. 7
      mamweb/settings_test.py
  10. 16
      seminar/admin.py
  11. 2
      seminar/templates/seminar/archiv/cislo_vysledkovka.tex
  12. 144
      seminar/templates/seminar/archiv/obalky.tex
  13. 17
      seminar/views.py

3
.gitignore

@ -27,3 +27,6 @@
# org poznamky
schemata
TODO
# .htpasswd kvůli přihlášení
.htpasswd

9
Makefile

@ -119,12 +119,13 @@ sync_test: sync_test_media sync_test_db
# Does not sync Galerie and CACHE (too huge).
sync_local_media:
rsync -ave ssh --exclude Galerie --exclude CACHE\
www-mam@atrey.karlin.mff.cuni.cz:/akce/MaM/WWW/mamweb-prod/media/ ./media/
mam-web@gimli.ms.mff.cuni.cz:/akce/mam/www/mamweb-prod/media/ ./media/
# Downloads and restores production database to local database. PostgreSQL only.
sync_local_db:
scp www-mam@atrey.karlin.mff.cuni.cz:`ssh www-mam@atrey.karlin.mff.cuni.cz 'ls -v /akce/MaM/WWW/backups/mam-prod-*\.pgdump | tail -n 1'` \
./last.pgdump
pg_restore -c -d mam_prod last.pgdump
scp mam-web@gimli.ms.mff.cuni.cz:`ssh mam-web@gimli.ms.mff.cuni.cz 'ls -v /akce/mam/www/backups/mam_prod-*\.pgdump.xz | tail -n 1'` \
./last.pgdump.xz
xz -fd last.pgdump.xz
pg_restore -c -d mam-prod last.pgdump
# Sync database and media. See above lines
sync_local: sync_media sync_db

22
korektury/templates/korektury/opraf.html

@ -7,10 +7,10 @@
<script src="{% static "korektury/opraf.js"%}"></script>
<title>Korektury {{pdf.nazev}}</title>
</head>
<body {% if pdf.status = 'zanaseni'%} class="comitting" {% elif pdf.status = 'zastarale' %} class="deprecated" {% endif %} onload='place_comments()'>
<body {% if pdf.status == 'zanaseni'%} class="comitting" {% elif pdf.status == 'zastarale' %} class="deprecated" {% endif %} onload='place_comments()'>
<h1>Korektury {{pdf.nazev}}</h1>
{% if pdf.status = 'zanaseni' %} <h2> Probíhá zanášení korektur, zvažte, zda chcete přidávat nové </h2> {% endif %}
{% if pdf.status = 'zastarale' %} <h2> Toto PDF je již zastaralé, nepřidávejte nové korektury </h2> {% endif %}
{% if pdf.status == 'zanaseni' %} <h2> Probíhá zanášení korektur, zvažte, zda chcete přidávat nové </h2> {% endif %}
{% if pdf.status == 'zastarale' %} <h2> Toto PDF je již zastaralé, nepřidávejte nové korektury </h2> {% endif %}
<i>{{pdf.komentar}}</i>
<br>
<i>Klikni na chybu, napiš komentář</i> |
@ -60,11 +60,11 @@
{% csrf_token %}
<input type='hidden' name='action' value='set-state'/>
<input type='hidden' name='pdf' value='{{pdf.id}}'/>
<input type="radio" name="state" value="adding" {% if pdf.status = 'pridavani' %} checked {% endif %}>Přidávání korektur
<input type="radio" name="state" value="adding" {% if pdf.status == 'pridavani' %} checked {% endif %}>Přidávání korektur
<br>
<input type="radio" name="state" value="comitting" {% if pdf.status = 'zanaseni' %} checked {% endif %}>Zanášení korektur
<input type="radio" name="state" value="comitting" {% if pdf.status == 'zanaseni' %} checked {% endif %}>Zanášení korektur
<br>
<input type="radio" name="state" value="deprecated" {% if pdf.status = 'zastarale' %} checked {% endif %}>Zastaralé, nekorigovat
<input type="radio" name="state" value="deprecated" {% if pdf.status == 'zastarale' %} checked {% endif %}>Zastaralé, nekorigovat
<br>
<input type='submit' value='Změnit stav PDF'/>
</form>
@ -81,12 +81,12 @@
{% for o in opravy %}
<div onclick='img_click(this,event)'
id='op{{o.id}}-pointer'
class='pointer{%if o.status = 'opraveno' %}-done{% elif o.status = 'neni_chyba' %}-wontfix{% elif o.status = 'k_zaneseni' %}-ready{% endif %}'>
class='pointer{%if o.status == 'opraveno' %}-done{% elif o.status == 'neni_chyba' %}-wontfix{% elif o.status == 'k_zaneseni' %}-ready{% endif %}'>
</div>
<div name='op{{o.id}}' id='op{{o.id}}'
class='box{%if o.status = 'opraveno' %}-done{% elif o.status = 'neni_chyba' %}-wontfix{% elif o.status = 'k_zaneseni' %}-ready{% endif %}'
onmouseover='box_onmouseover(this,{% if o.status = 'opraveno' %}"done"{% elif o.status = 'neni_chyba' %}"wontfix"{% elif o.status = 'k_zaneseni' %}"ready"{% else %}""{% endif %})'
onmouseout='box_onmouseout(this, {% if o.status = 'opraveno' %}"done"{% elif o.status = 'neni_chyba' %}"wontfix"{% elif o.status = 'k_zaneseni' %}"ready"{% else %}""{% endif %})'>
class='box{%if o.status == 'opraveno' %}-done{% elif o.status == 'neni_chyba' %}-wontfix{% elif o.status == 'k_zaneseni' %}-ready{% endif %}'
onmouseover='box_onmouseover(this,{% if o.status == 'opraveno' %}"done"{% elif o.status == 'neni_chyba' %}"wontfix"{% elif o.status == 'k_zaneseni' %}"ready"{% else %}""{% endif %})'
onmouseout='box_onmouseout(this, {% if o.status == 'opraveno' %}"done"{% elif o.status == 'neni_chyba' %}"wontfix"{% elif o.status == 'k_zaneseni' %}"ready"{% else %}""{% endif %})'>
<div class='corr-header'>
<span class='author' id='op{{o.id}}-autor'>{{o.autor}}</span>
@ -142,7 +142,7 @@
<img src="{% static "korektury/imgs/edit.png" %}"/>
</button>
{% endif %}
{% if o.status = 'opraveno' or o.status = 'neni_chyba' %}
{% if o.status == 'opraveno' or o.status == 'neni_chyba' %}
<button type='button' title='Korekturu nelze komentovat, protože už je uzavřená'>
<img src="{% static "korektury/imgs/comment-gr.png" %}"/>
</button>

2
korektury/templates/korektury/seznam.html

@ -17,7 +17,7 @@
<ul>
{% for pdf in object_list %}
<li><span {% if pdf.status = 'zanaseni'%} class="comitting-text" {% elif pdf.status = 'zastarale' %} class="deprecated-text" {% endif %}> <b>{{ pdf.nazev }}</b> <i>{{pdf.komentar}}</i> <a href="/korektury/{{pdf.id}}">{{pdf.pdf.name}}</a> </span> </li>
<li><span {% if pdf.status == 'zanaseni'%} class="comitting-text" {% elif pdf.status == 'zastarale' %} class="deprecated-text" {% endif %}> <b>{{ pdf.nazev }}</b> <i>{{pdf.komentar}}</i> <a href="/korektury/{{pdf.id}}">{{pdf.pdf.name}}</a> </span> </li>
{% empty %}
<li> Nejsou žádné dokumenty ke korekturování.
{% endfor %}

4
mamweb/admin.py

@ -6,10 +6,10 @@ from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld
from django import forms
from ckeditor.widgets import CKEditorWidget
from ckeditor_uploader.widgets import CKEditorUploadingWidget
class FlatpageForm(FlatpageFormOld):
content = forms.CharField(widget=CKEditorWidget())
content = forms.CharField(widget=CKEditorUploadingWidget())
class Meta:
model = FlatPage # this is not automatically inherited from FlatpageFormOld
exclude = []

1
mamweb/settings_common.py

@ -100,6 +100,7 @@ INSTALLED_APPS = (
'django_countries',
'solo',
'ckeditor',
'ckeditor_uploader',
'taggit',
'autocomplete_light',

9
mamweb/settings_local.py

@ -10,6 +10,9 @@ import os.path
# Import common settings
from .settings_common import *
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
@ -22,7 +25,7 @@ INSTALLED_APPS += (
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
TEMPLATES[0]['OPTIONS']['debug'] = True
ALLOWED_HOSTS = ['127.0.0.1']
@ -48,7 +51,3 @@ DATABASES = {
# set to 'DEBUG' for EXTRA verbose output
LOGGING['handlers']['console']['level'] = 'INFO'
# So that it is not necessary to restart the server every time a template is
# changed
TEMPLATE_LOADERS = ('django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader')

2
mamweb/settings_prod.py

@ -50,7 +50,7 @@ SERVER_EMAIL = 'mamweb-prod-errors@mam.mff.cuni.cz'
ADMINS = [
('Tomas Gavenciak', 'gavento@gmail.com'),
('Matěj Kocián', 'matej.kocian@gmail.com'),
('M&M ERRORs', 'mam-errors@atrey.karlin.mff.cuni.cz'),
('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz'),
]

7
mamweb/settings_test.py

@ -12,6 +12,9 @@ import os.path
# Import common settings
from .settings_common import * # zatim nutne, casem snad vyresime # noqa
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
@ -27,7 +30,7 @@ SECRET_KEY = ')^u=i65*zmr_k53a*@f4q_+ji^o@!pgpef*5&8c7zzv9l+zo)n'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = False
TEMPLATES[0]['OPTIONS']['debug'] = True
ALLOWED_HOSTS = ['*.mam.mff.cuni.cz', 'atrey.karlin.mff.cuni.cz', 'mam.mff.cuni.cz', 'mam-test.kam.mff.cuni.cz', 'gimli.ms.mff.cuni.cz']
@ -49,7 +52,7 @@ import os
SERVER_EMAIL = 'mamweb-test-errors@mam.mff.cuni.cz'
ADMINS = [
('M&M ERRORs', 'mam-errors@atrey.karlin.mff.cuni.cz'),
('M&M ERRORs', 'mam-errors@mam.mff.cuni.cz'),
]

16
seminar/admin.py

@ -5,7 +5,7 @@ from django import forms
from django.forms import widgets
from reversion.admin import VersionAdmin
from solo.admin import SingletonModelAdmin
from ckeditor.widgets import CKEditorWidget
from ckeditor_uploader.widgets import CKEditorUploadingWidget
from django.db.models import Count
from django.db import models
from django.utils.safestring import mark_safe
@ -402,9 +402,9 @@ from autocomplete_light.contrib.taggit_field import TaggitField, TaggitWidget
class ProblemAdminForm(forms.ModelForm):
text_zadani = forms.CharField(widget=CKEditorWidget(), required=False, **field_labels(Problem, 'text_zadani'))
text_reseni = forms.CharField(widget=CKEditorWidget(), required=False, **field_labels(Problem, 'text_reseni'))
text_org = forms.CharField(widget=CKEditorWidget(), required=False, **field_labels(Problem, 'text_org'))
text_zadani = forms.CharField(widget=CKEditorUploadingWidget(), required=False, **field_labels(Problem, 'text_zadani'))
text_reseni = forms.CharField(widget=CKEditorUploadingWidget(), required=False, **field_labels(Problem, 'text_reseni'))
text_org = forms.CharField(widget=CKEditorUploadingWidget(), required=False, **field_labels(Problem, 'text_org'))
zamereni = TaggitField(widget=TaggitWidget('TagAutocomplete'), required=False)
autor = UserModelChoiceField(User.objects.filter(is_staff=True))
opravovatel = UserModelChoiceField(User.objects.filter(is_staff=True), required=False)
@ -536,9 +536,9 @@ create_modeladmin(ProblemZadanyAdmin, Problem, 'ProblemZadany', verbose_name=u'P
### Prispevek (k tematkum)
class PrispevekAdminForm(forms.ModelForm):
text_org = forms.CharField(widget=CKEditorWidget(), required=False,
text_org = forms.CharField(widget=CKEditorUploadingWidget(), required=False,
**field_labels(Prispevek, 'text_org'))
text_resitel = forms.CharField(widget=CKEditorWidget(), required=False,
text_resitel = forms.CharField(widget=CKEditorUploadingWidget(), required=False,
**field_labels(Prispevek, 'text_resitel'))
class Meta:
@ -554,7 +554,7 @@ admin.site.register(Prispevek, PrispevekAdmin)
### Soustredeni
class SoustredeniAdminForm(forms.ModelForm):
text = forms.CharField(widget=CKEditorWidget(), required=False, **field_labels(Soustredeni, 'text'))
text = forms.CharField(widget=CKEditorUploadingWidget(), required=False, **field_labels(Soustredeni, 'text'))
class Meta:
model = Soustredeni
exclude = []
@ -595,7 +595,7 @@ admin.site.register(Konfera,KonferaAdmin)
### Novinky
class NovinkyAdminForm(forms.ModelForm):
text = forms.CharField(widget=CKEditorWidget(), required=False,
text = forms.CharField(widget=CKEditorUploadingWidget(), required=False,
**field_labels(Novinky, 'text'))
autor = UserModelChoiceField(User.objects.filter(is_staff=True))

2
seminar/templates/seminar/archiv/cislo_vysledkovka.tex

@ -1,6 +1,6 @@
\setlength{\tabcolsep}{3pt}
\begin{longtable}{|r|l|c|r|{% for p in problemy %}c@{\hskip.5em}{% endfor %}|r|r|}\hline
& & & & \multicolumn{ {{ problemy|length}} }{c|}{\textbf{Úlohy}} & & \\\textbf{Poř.}& \textbf{Jméno}& \textbf{R.}& \raisebox{0.7mm}{$\sum_{-1}$}& {% for p in problemy %}{% if p.typ == "uloha" %}\textbf{r{{p.kod}}}&{% elif p.typ = "tema" %}\textbf{t{{p.kod}}}&{% else %}\textbf{ {{p.kod}} }&{% endif %}{% endfor %}\raisebox{0.7mm}{$\sum_0$}&\raisebox{0.7mm}{$\sum_1$}\\\hline
& & & & \multicolumn{ {{ problemy|length}} }{c|}{\textbf{Úlohy}} & & \\\textbf{Poř.}& \textbf{Jméno}& \textbf{R.}& \raisebox{0.7mm}{$\sum_{-1}$}& {% for p in problemy %}{% if p.typ == "uloha" %}\textbf{r{{p.kod}}}&{% elif p.typ == "tema" %}\textbf{t{{p.kod}}}&{% else %}\textbf{ {{p.kod}} }&{% endif %}{% endfor %}\raisebox{0.7mm}{$\sum_0$}&\raisebox{0.7mm}{$\sum_1$}\\\hline
\endhead
\hline
\endfoot

144
seminar/templates/seminar/archiv/obalky.tex

@ -1,79 +1,97 @@
{% autoescape off %}
{% load staticfiles %}
{% load tex %}
\input czech.sty
\input epsf
\special{landscape}
\nopagenumbers
\hoffset=-1in
\voffset=-1in
\advance\voffset by 0.9cm
%nove pridano, aby to fungovalo...
\advance\hoffset by 6.5cm
\hsize=22cm
\vsize=16cm
\font\adrfonta=csssbx10 at 14pt
\font\adrfontb=csssbx10 at 12pt
\font\adrfontc=csss12
\font\tofont=csr12 at 16pt
\newdimen\fromskip
\newdimen\toskip
\fromskip=4.35cm
\toskip=13.2cm
\def\first{\relax}
\documentclass[11pt,a4paper,landscape]{article}
\usepackage[top=3.75cm,left=8cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[czech]{babel}
\usepackage{graphicx}
\begin{document}
% Nechceme číslování stránek
\pagenumbering{gobble}
% Různé fonty na obálce
\def\adrfonta#1{%
\fontsize{14pt}{14.5pt}\selectfont \textbf{\textsf{#1}}%Časopis M&M
}
\def\adrfontb#1{%
\fontsize{12pt}{13pt}\selectfont \textbf{\textsf{#1}}%OPMK UK MFF
}
\def\adrfontc#1{%
\fontsize{12pt}{13pt}\selectfont \textsf{#1}%Adresa, telefon, e-mail
}
\def\tofont#1{%
\fontsize{16pt}{18pt}\selectfont #1%Adresa řešitele
}
%Podtržítko je znak
\catcode`_=13
%\catcode`_=12
\def_{$\_$}
\advance\voffset by 2.5cm
\def\obalka#1#2#3#4#5#6#7{
\def\jmeno{#1}
\def\prijm{#2}
\def\skola{#3}
\def\popis{}
\def\first{}
\def\ulice{#4}
\def\PSC{#5}
\def\mesto{#6}
\def\stat{#7}
\vskip-4mm\vbox to 0pt{\hbox to 0pt{\hskip1.4cm\epsfysize=2.55cm\epsfbox{lisak.eps}\hss}\vss}
% Odsazení různých adres
\parindent=0pt
%\newdimen\fromskip
\newdimen\toskip
%\fromskip=4.35cm
\toskip=11.7cm
% Předsunutí -- na PSČ
\def\predsunout#1{%
\setbox0=\hbox{#1\,}%
\hskip -\wd0\relax%
\box0
}
\baselineskip=13pt
\parindent=\fromskip
\line{\indent\adrfonta Časopis M\&M,\hfil}
\vskip3pt
\line{\indent\adrfontb OPMK UK MFF\hfil}
\vskip3pt
\line{\indent\adrfontc Ke Karlovu 3, 121 16 Praha 2\hfil}
\line{\indent\adrfontc Tel.: +420 221 911 235\hss}
\line{\indent\adrfontc mam@atrey.karlin.mff.cuni.cz\hfil}
% Makro na TeXáni naší adresy
\def\adresaMaM{%
\hbox{\adrfonta{Časopis M\&M,}}
\vskip 3 pt
\hbox{\adrfontb{OPMK UK MFF}}
\vskip 3 pt
\hbox{\adrfontc{Ke Karlovu 3, 121 16 Praha 2}}
\hbox{\adrfontc{Tel.: +420 221 911 235}}
\hbox{\adrfontc{mam@matfyz.cz}}
}
\vskip6.15cm
\vbox to 0pt{\parindent=1.4cm\hsize=\toskip\advance\hsize by -1cm
\vbox to 60pt{\vfil} \popis\vss}
\parindent=\toskip
\baselineskip=18pt
\line{\indent\tofont\first\hfil}
\line{\indent\tofont\jmeno\ \prijm\hfil}
% Makro na TeXání adresátovy adresy
\def\adresat#1#2#3#4#5#6#7{%
\def\jmeno{#1}%
\def\prijm{#2}%
\def\skola{#3}%
%\def\popis{}
%\def\first{}
\def\ulice{#4}%
\def\PSC{#5}%
\def\mesto{#6}%
\def\stat{#7}%
\hbox{\tofont{\jmeno\ \prijm}}
\vskip .2 em
\ifx \skola \empty
{}
\else
\line{\indent\tofont\skola\hfil}
\hbox{\tofont{\skola}}
\fi
\line{\indent\tofont\ulice\hfil}
\line{\tofont\item{\PSC} \mesto\hfil}
\vskip5pt
\line{\indent\tofont\stat\hfil}
\vskip .2 em
\hbox{\tofont{\ulice}}
\vskip .2 em
\vskip .2 em
\hbox to 18pt{\tofont{\predsunout{\PSC\ }\mesto}}
\vskip 5 pt
\tofont{\stat}
}
\vfil\eject
% Tohle makro vysází samotnou obálku
\def\obalka#1#2#3#4#5#6#7{
% Horní a pravý okraj je zároveň okraj stránky, resetujeme odsazení
\includegraphics[height=2.55cm]{lisak.eps}\hskip 1 em\vbox{%
\adresaMaM}
\vskip 7.3 cm % Od oka
\hskip\toskip%
\vbox{\adresat{#1}{#2}{#3}{#4}{#5}{#6}{#7}}
\vfill\eject
}
@ -98,6 +116,6 @@
{% endif %}
{% endspaceless %}
{% endfor %}
\bye
\end{document}
{% endautoescape %}

17
seminar/views.py

@ -502,7 +502,7 @@ class CisloView(generic.DetailView):
class ArchivTemataView(generic.ListView):
model = Problem
template_name = 'seminar/archiv/temata.html'
queryset = Problem.objects.filter(typ=Problem.TYP_TEMA, stav=Problem.STAV_ZADANY).select_related('cislo_zadani__rocnik__rocnik').order_by('-cislo_zadani__rocnik__rocnik', 'kod')
queryset = Problem.objects.filter(typ=Problem.TYP_TEMA, stav=Problem.STAV_ZADANY).select_related('cislo_zadani__rocnik').order_by('-cislo_zadani__rocnik__rocnik', 'kod')
### Generovani vysledkovky
@ -552,9 +552,8 @@ def aktivniResitele(rocnik,cislo):
if int(cislo) > 3:
problemy = Problem.objects.filter(cislo_zadani = letos.cisla)
else:
problemy = Problem.objects.filter(Q(cislo_zadani = letos.cisla)|Q(cislo_zadani=loni.cisla))
resitele = aktualni_resitele.filter(reseni = Reseni.objects.filter(problem=problemy)).distinct()
problemy = Problem.objects.filter(Q(cislo_zadani__in = letos.cisla)|Q(cislo_zadani__in = loni.cisla))
resitele = aktualni_resitele.filter(reseni__in = Reseni.objects.filter(problem__in=problemy)).distinct()
return resitele
@ -567,11 +566,9 @@ def obalkyView(request,resitele):
tempdir = tempfile.mkdtemp()
with open(tempdir+"/obalky.tex","w") as texfile:
# Pokud TeX chce ISO Latin, tak se da encode nastavit
texfile.write(tex.decode("utf-8").encode("iso-8859-2"))
texfile.write(tex)
shutil.copy(os.path.join(settings.STATIC_ROOT, 'seminar/lisak.eps'),tempdir)
subprocess.call(["csplain","obalky.tex"],cwd = tempdir)
subprocess.call(["dvipdf","obalky.dvi"],cwd = tempdir)
subprocess.call(["pdflatex","obalky.tex"],cwd = tempdir)
with open(tempdir+"/obalky.pdf","rb") as pdffile:
response = HttpResponse(pdffile.read(),content_type='application/pdf')
@ -707,12 +704,12 @@ def soustredeniUcastniciExportView(request,soustredeni):
class ClankyResitelView(generic.ListView):
model = Problem
template_name = 'seminar/clanky/resitelske_clanky.html'
queryset = Problem.objects.filter(typ=Problem.TYP_RES_CLANEK, stav=Problem.STAV_ZADANY).select_related('cislo_zadani__rocnik__rocnik').order_by('-cislo_zadani__rocnik__rocnik', 'kod')
queryset = Problem.objects.filter(typ=Problem.TYP_RES_CLANEK, stav=Problem.STAV_ZADANY).select_related('cislo_zadani__rocnik').order_by('-cislo_zadani__rocnik__rocnik', 'kod')
class ClankyOrganizatorView(generic.ListView):
model = Problem
template_name = 'seminar/clanky/organizatorske_clanky.html'
queryset = Problem.objects.filter(typ=Problem.TYP_ORG_CLANEK, stav=Problem.STAV_ZADANY).select_related('cislo_zadani__rocnik__rocnik').order_by('-cislo_zadani__rocnik__rocnik', 'kod')
queryset = Problem.objects.filter(typ=Problem.TYP_ORG_CLANEK, stav=Problem.STAV_ZADANY).select_related('cislo_zadani__rocnik').order_by('-cislo_zadani__rocnik__rocnik', 'kod')
### Status

Loading…
Cancel
Save