Merge branch 'develop' into test
This commit is contained in:
commit
6346f0ec4a
4 changed files with 8 additions and 4 deletions
1
Makefile
1
Makefile
|
@ -34,6 +34,7 @@ install_web: venv_check
|
||||||
pip install --upgrade setuptools
|
pip install --upgrade setuptools
|
||||||
# Instalace závislostí webu
|
# Instalace závislostí webu
|
||||||
pip install -r requirements.txt --upgrade
|
pip install -r requirements.txt --upgrade
|
||||||
|
# Pro vygenerování tesdat spusť ./manage.py testdata
|
||||||
# Po vygenerování testdat spusť ./manage.py loaddata data/*, ať máš menu a další modely
|
# Po vygenerování testdat spusť ./manage.py loaddata data/*, ať máš menu a další modely
|
||||||
# Pro synchronizaci flatpages spusť make sync_prod_flatpages
|
# Pro synchronizaci flatpages spusť make sync_prod_flatpages
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,9 @@ Run the following commands:
|
||||||
. env/bin/activate
|
. env/bin/activate
|
||||||
make install_web
|
make install_web
|
||||||
|
|
||||||
|
Pokud install_web říká Error: pg_config executable not found. nainstaluj si libpq-dev
|
||||||
|
Pokud chybová hláška obsahuje #include <Python.h>, nainstaluj si python3-dev
|
||||||
|
|
||||||
After finishing development, run "deactivate".
|
After finishing development, run "deactivate".
|
||||||
|
|
||||||
Make commands
|
Make commands
|
||||||
|
|
|
@ -28,7 +28,7 @@ class KorekturovanePDFAdmin(VersionAdmin):
|
||||||
readonly_fields = ['cas', 'stran']
|
readonly_fields = ['cas', 'stran']
|
||||||
|
|
||||||
def get_readonly_fields(self, request, obj=None):
|
def get_readonly_fields(self, request, obj=None):
|
||||||
""" Nevím, proč to tu je - Jidáš """
|
""" Když pdf existuje, tak nedovolím měnit ani pdf."""
|
||||||
if obj:
|
if obj:
|
||||||
return self.readonly_fields + ['pdf']
|
return self.readonly_fields + ['pdf']
|
||||||
return self.readonly_fields
|
return self.readonly_fields
|
||||||
|
|
|
@ -48,21 +48,21 @@
|
||||||
<h3> Témata </h3>
|
<h3> Témata </h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for t in temata %}
|
{% for t in temata %}
|
||||||
<li> {{ t }} </li>
|
<li><a href="{{ t.admin_url }}">{{ t }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3> Úlohy </h3>
|
<h3> Úlohy </h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for u in ulohy %}
|
{% for u in ulohy %}
|
||||||
<li> {{ u }} </li>
|
<li><a href="{{ u.admin_url }}">{{ u }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3> Články </h3>
|
<h3> Články </h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for c in clanky %}
|
{% for c in clanky %}
|
||||||
<li> {{ c }} </li>
|
<li><a href="{{ c.admin_url }}">{{ c }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue