Merge branch 'test' into develop

This commit is contained in:
Pavel "LEdoian" Turinsky 2022-01-31 22:53:19 +01:00
commit be1a0fc56a
30 changed files with 48 additions and 39 deletions

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block title %} Nápověda ke korekturovátku {% endblock title %}

View file

@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
<html>
<head>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block script%}
<link rel="stylesheet" type="text/css" media="screen, projection" href="{% static "korektury/opraf-list.css" %}" />
@ -15,7 +15,7 @@
{% endblock nadpis1a %}
</h1>
{% regroup object_list|dictsortreversed:"cislo_a_tema" by cislo_a_tema as seskupeny_list %}
{% regroup object_list by cislo_a_tema as seskupeny_list %}
{% for skupina in seskupeny_list %}
{{ skupina.grouper }}
@ -32,6 +32,8 @@
<li> Nejsou žádné dokumenty ke korekturování.
{% endfor %}
</ul>
{% empty %}
<p>Nejspíš se nepodařilo seskupit korektury podle čísel. Napiš prosím webařům a mezitím použij <a href="{% url 'korektury_neseskupene_list' %}">neseskupený seznam</a>.</p>
{% endfor %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block script%}
<link rel="stylesheet" type="text/css" media="screen, projection" href="{% static "korektury/opraf-list.css" %}" />

View file

@ -4,6 +4,7 @@ from . import views
urlpatterns = [
path('korektury/', org_required(views.KorekturySeskupeneListView.as_view()), name='korektury_list'),
path('korektury/neseskupene/', org_required(views.KorekturyAktualniListView.as_view()), name='korektury_neseskupene_list'),
path('korektury/zastarale/', org_required(views.KorekturyZastaraleListView.as_view()), name='korektury_stare_list'),
path('korektury/<int:pdf>/', org_required(views.KorekturyView.as_view()), name='korektury'),
]

View file

@ -41,9 +41,6 @@ class KorekturyAktualniListView(KorekturyListView):
return context
class KorekturySeskupeneListView(KorekturyAktualniListView):
template_name = 'korektury/seskupeny_seznam.html'
class KorekturyZastaraleListView(KorekturyListView):
def get_queryset(self, *args, **kwargs):
@ -56,6 +53,14 @@ class KorekturyZastaraleListView(KorekturyListView):
context['selected'] = 'zastarale'
return context
class KorekturySeskupeneListView(KorekturyAktualniListView):
template_name = 'korektury/seskupeny_seznam.html'
# {% regroup %} potřebuje dostat správně setříděné názvy, aby nedělal duplikáty
def get_queryset(self, *args, **kwargs):
qs = super().get_queryset(**kwargs)
return qs.order_by('nazev')
### Korektury
class KorekturyView(generic.TemplateView):
model = Oprava

View file

@ -348,4 +348,5 @@ class InvalidTemplateVariable(str):
return ''
TEMPLATES[0]['OPTIONS']['string_if_invalid'] = InvalidTemplateVariable('%s')
# Django 3.2 vyžaduje explicitní nastavení autoklíče, zatím nechápu proč
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

View file

@ -1,6 +1,6 @@
{% extends "error_base.html" %}
{% load staticfiles %}
{% load static %}
{% block errorheading %}
O-jo-jo-jo-joj

View file

@ -1,6 +1,6 @@
{% extends "error_base.html" %}
{% load staticfiles %}
{% load static %}
{% block errorheading %}
Vrrrrrrrrr

View file

@ -1,6 +1,6 @@
{% extends "error_base.html" %}
{% load staticfiles %}
{% load static %}
{% block errorheading %}
Požadovaná stránka nenalezena

View file

@ -1,6 +1,6 @@
{% extends "error_base.html" %}
{% load staticfiles %}
{% load static %}
{% block errorheading %}
O-jo-jo-jo-joj

View file

@ -1,5 +1,5 @@
{% extends "admin/base.html" %}
{% load staticfiles %}
{% load static %}
{% block extrahead %}
<link rel="shortcut icon" href="{% static 'favicon.ico' %}" type="image/x-icon">

View file

@ -1,4 +1,4 @@
{% load staticfiles sekizai_tags %}
{% load static sekizai_tags %}
{% load sitetree %}
<!DOCTYPE html>
<html lang='cs'>

View file

@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
<img class="logo"
{% for item in sitetree_items %}
{% if item.is_active or item.in_current_branch %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block script %}
<script src="{% static 'odevzdavatko/dynamic_formsets.js' %}"></script>
{% endblock %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block script %}
<!--script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script!-->
{{form.media}}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block content %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block script %}
<script src="{% static 'personalni/prihlaska.js' %}"></script>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block script %}
<script src="{% static 'personalni/prihlaska.js' %}"></script>

View file

@ -52,7 +52,7 @@ class Seznam_PrednaskaInline(admin.TabularInline):
]
exclude = ['prednaska']
def has_add_permission(self, req): return False
def has_add_permission(self, req, obj): return False
class SeznamAdmin(VersionAdmin):

View file

@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% load humanize %}
{% load staticfiles %}
{% load static %}
{% block content %}

View file

@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% load humanize %}
{% load staticfiles %}
{% load static %}
{% block content %}

View file

@ -1,7 +1,7 @@
-c constraints.txt
# basic libs
psycopg2<2.9 # Kvůli djangu 2.2, odstranit při přechodu na 3.
psycopg2
html5lib
ipython
Pillow
@ -13,7 +13,7 @@ Unidecode
# Django and modules
Django<2.3
Django<3.3
#django-bootstrap-sass
django-mptt
django-reversion
@ -34,14 +34,14 @@ django-webpack-loader
django-rest-polymorphic
# Comments
django-contrib-comments==1.9.0
django-contrib-comments
# debug tools/extensions
django-debug-toolbar==1.11
django-extensions==2.1.9
sqlparse==0.2.4
Werkzeug==0.14.1
django-debug-toolbar
django-extensions
sqlparse
Werkzeug
# G+, FB authorisation
@ -52,7 +52,7 @@ requests
# requests-oauthlib
# uWSGI
uWSGI==2.0.17.1
uWSGI
# Potřeba pro test data

View file

@ -1,5 +1,5 @@
{% autoescape off %}
{% load staticfiles %}
{% load static %}
{% load tex %}
\documentclass[11pt,a4paper,landscape]{article}
\usepackage[top=3.75cm,left=8cm]{geometry}

View file

@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% load humanize %}
{% load staticfiles %}
{% load static %}
{% block content %}

View file

@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
{% block content %}
<h1>

View file

@ -10,7 +10,7 @@ function sousdeadline() {
{% extends 'base.html' %}
{% load humanize %}
{% load staticfiles %}
{% load static %}
{% block content %}

View file

@ -1,5 +1,5 @@
{% extends "seminar/archiv/base.html" %}
{% load staticfiles %}
{% load static %}
{% load sekizai_tags %}
{# toto z nejakeho duvodu nefunguje #}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block content %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% block content %}