Browse Source

Merge branch 'test'

middleware_test
Pavel 'LEdoian' Turinsky 5 years ago
parent
commit
b1d2e19488
  1. 1
      seminar/admin.py
  2. 1603
      seminar/static/seminar/lisak.eps
  3. BIN
      seminar/static/seminar/lisak.pdf
  4. 3
      seminar/templates/seminar/archiv/obalky.tex
  5. 2
      seminar/views.py

1
seminar/admin.py

@ -209,6 +209,7 @@ class ResitelAdmin(VersionAdmin):
(u'Seminář', {'fields': ['datum_souhlasu_udaje', 'datum_souhlasu_zasilani', 'datum_prihlaseni', 'zasilat']}),
(u'Osobní údaje', {'fields': ['pohlavi_muz', 'datum_narozeni', 'email', 'telefon']}),
(u'Adresa', {'fields': ['ulice', 'mesto', 'psc', 'stat']}),
(u'Další', {'fields': ['poznamka']}),
]
list_display = ['jmeno', 'prijmeni', 'user', 'pohlavi_muz', 'skola', 'rok_maturity', 'pocet_reseni']
list_filter = ['pohlavi_muz', 'rok_maturity', 'zasilat']

1603
seminar/static/seminar/lisak.eps

File diff suppressed because it is too large

BIN
seminar/static/seminar/lisak.pdf

Binary file not shown.

3
seminar/templates/seminar/archiv/obalky.tex

@ -86,7 +86,8 @@
% 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{%
\includegraphics[height=2.55cm]{lisak.pdf}
\vbox{%
\adresaMaM}
\vskip 7.3 cm % Od oka
\hskip\toskip%

2
seminar/views.py

@ -572,7 +572,7 @@ def obalkyView(request,resitele):
tempdir = tempfile.mkdtemp()
with open(tempdir+"/obalky.tex","w") as texfile:
texfile.write(tex)
shutil.copy(os.path.join(settings.STATIC_ROOT, 'seminar/lisak.eps'),tempdir)
shutil.copy(os.path.join(settings.STATIC_ROOT, 'seminar/lisak.pdf'),tempdir)
subprocess.call(["pdflatex","obalky.tex"],cwd = tempdir)
with open(tempdir+"/obalky.pdf","rb") as pdffile:

Loading…
Cancel
Save