diff --git a/_git_hooks/pre-commit b/_git_hooks/pre-commit index 3ba59e0a..664a06ce 100755 --- a/_git_hooks/pre-commit +++ b/_git_hooks/pre-commit @@ -8,7 +8,10 @@ FLAKE8="`git rev-parse --show-toplevel`/bin/flake8" status=0 -git diff --unified=1 --cached HEAD -- '*py' > $TMPDIFF +# select only changed python files which are not migrations +changed=`git diff --cached --name-only | grep 'py$' | grep -v 'migrations/[0-9]'` + +git diff --unified=1 --cached HEAD -- $changed > $TMPDIFF # only do the check when there are some changes to be commited # otherwise flake8 would hang waiting for input diff --git a/_git_hooks/update b/_git_hooks/update index 2ac082c1..c700a1b1 100755 --- a/_git_hooks/update +++ b/_git_hooks/update @@ -27,7 +27,15 @@ TMPDIFF=`tempfile` [ $refname != "refs/heads/master" -a $refname != "refs/heads/stable" ] && exit 0 -git diff --unified=1 $oldrev $newrev -- '*.py' >${TMPDIFF} +# select only changed python files which are not migrations +changed=`git diff --name-only $oldrev $newrev | grep 'py$' | grep -v 'migrations/[0-9]'` +if [ -z $changed ] ; then + # Nothing to check. Note the exit is necessary -- we would not pass any + # paths to git diff below and it would output the diff unfiltered. + exit 0 +fi + +git diff --unified=1 $oldrev $newrev -- $changed >${TMPDIFF} # there is no working tree in bare git repository, so we recreate it for flake8 git archive $newrev | tar -x -C ${TMPDIR} diff --git a/korektury/admin.py b/korektury/admin.py index 6c9e7cad..7e74cf27 100644 --- a/korektury/admin.py +++ b/korektury/admin.py @@ -12,7 +12,7 @@ class KorekturovanePDFAdmin(VersionAdmin): ['pdf', 'cas', 'org', 'stran', 'nazev', 'komentar']}), # (u'PDF', {'fields': ['pdf']}), ] - list_display = ['nazev', 'cas', 'stran'] + list_display = ['nazev', 'cas', 'stran', 'org'] list_filter = [] search_fields = [] diff --git a/mamweb/static/css/printtable.css b/mamweb/static/css/printtable.css new file mode 100644 index 00000000..9d4baa13 --- /dev/null +++ b/mamweb/static/css/printtable.css @@ -0,0 +1,19 @@ +table { + border-collapse: collapse; + width: 100% +} + +table, th, td { + border: 1px solid black; +} + +td { + width: 1%; + height: 1cm; +} + + +.fill { + width: 100%; + max-width: 100% +} diff --git a/mamweb/urls.py b/mamweb/urls.py index 46e0e292..64769071 100644 --- a/mamweb/urls.py +++ b/mamweb/urls.py @@ -18,6 +18,9 @@ urlpatterns = [ # Korekturovaci aplikace (ma vlastni podadresare) url(r'^', include('korektury.urls')), + + # Prednaskova aplikace (ma vlastni podadresare) + url(r'^', include('prednasky.urls')), # Comments (interni i verejne) url(r'^comments_dj/', include('django_comments.urls')), diff --git a/prednasky/templates/prednasky/metaseznam_prednasek.html b/prednasky/templates/prednasky/metaseznam_prednasek.html new file mode 100644 index 00000000..c6c00b96 --- /dev/null +++ b/prednasky/templates/prednasky/metaseznam_prednasek.html @@ -0,0 +1,26 @@ +{% extends "prednasky/Base.html" %} + + +{% block header %}hlasovani{% endblock %} + +{% block nadpis1a %}{% block nadpis1b %} + Hlasování o přednáškách +{% endblock %}{% endblock %} + +{% block content %} + {# Projdi vsechny seznamy #} +
+