Browse Source

Merge pull request 'Odstranění starých dependencí a okomentování většiny stávajících' (!42) from odstraneni_starych_dependenci into master

Reviewed-on: #42
pull/46/head
Jonas Havelka 1 year ago
parent
commit
b8f2e1da3b
  1. 5
      mamweb/settings_common.py
  2. 9
      mamweb/static/css/mamweb.css
  3. 5
      mamweb/templates/base.html
  4. 4
      mamweb/urls.py
  5. 38
      requirements.txt
  6. 6
      seminar/templates/seminar/archiv/problem.html
  7. 1
      seminar/templatetags/utils.py
  8. 5
      seminar/testutils.py
  9. 9
      treenode/templates/treenode/orphanage.html

5
mamweb/settings_common.py

@ -87,7 +87,6 @@ TEMPLATES = [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages',
'sekizai.context_processors.sekizai',
'header_fotky.context_processors.vzhled',
'various.context_processors.rozliseni',
'various.context_processors.april',
@ -110,7 +109,6 @@ INSTALLED_APPS = (
'django.contrib.auth',
# Utilities
'sekizai',
'reversion',
'django_countries',
'solo',
@ -120,9 +118,6 @@ INSTALLED_APPS = (
'dal',
'dal_select2',
'crispy_forms',
'django_comments',
'django.contrib.flatpages',
'django.contrib.humanize',

9
mamweb/static/css/mamweb.css

@ -199,15 +199,6 @@ h1 {
margin-top: 0px;
}
/* Comments */
#id_comment {
width: 100%;
height: 6em;
}
/* Headline & Header */
#title { /*dělá blbosti šířka, je to kvůli fixed pozici, zatím natvrdo, vyřešit*/

5
mamweb/templates/base.html

@ -1,4 +1,4 @@
{% load static sekizai_tags %}
{% load static %}
{% load sitetree %}
<!DOCTYPE html>
<html lang='cs'>
@ -7,7 +7,6 @@
<title>{% block title %}{% block nadpis1a %}🦊{% endblock %} | Korespondenční seminář M&amp;M{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="{% static 'images/MATFYZ_MM_barevne.svg' %}" type="image/x-icon">
{# {% render_block css %}#}
{% block custom_css %}{% endblock %}
<link href="{% static 'css/bootstrap-theme.css' %}" rel="stylesheet">
<link href="{% static 'css/bootstrap.css' %}" rel="stylesheet">
@ -189,6 +188,6 @@
walkText(document.body);
</script>
{% endif %}
{% render_block "js" %}
{% block js %}{% endblock %}
</body>
</html>

4
mamweb/urls.py

@ -13,7 +13,6 @@ Soubor sloužící jako základní „router“, tj. zde se includují veškeré
- :mod:`api.urls`
- :mod:`treenode.urls`
- :mod:`aesop.urls`
- ``comments_dj/`` :mod:`django_comments.urls`
"""
from django.urls import path, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
@ -62,9 +61,6 @@ urlpatterns = [
# Aesop (ma vlastni podadresare)
path('', include('aesop.urls')),
# Comments (interni i verejne)
path('comments_dj/', include('django_comments.urls')),
# REST API
# path('api/', include(router.urls)),

38
requirements.txt

@ -1,43 +1,31 @@
-c constraints.txt
# basic libs
psycopg2
html5lib
ipython
psycopg2 # PostgreSQL adaptér
ipython # Interaktivní shell
Unidecode # Přepisuje unicode do ASCII (např. soubory nebo e-maily)
Pillow
pilkit>=3.0 # Kvůli kompatibilitě s Pillow>=10.0.0
pytz
six
pexpect
traitlets
Unidecode
# Django and modules
Django<5.0
#django-bootstrap-sass
django-mptt
django-reversion
django-sekizai
django-countries
django-solo
django-ckeditor
django-reversion # Version control na datech v databázi
django-countries # Políčko ve formu / field v modelu ohledně států
django-solo # Singleton model (speciálně Nastavení)
django-ckeditor # Editor htmlka (hlavně v adminu u flatpages)
django-cleanup # Uklízí media/ od smazaných „databázových“ souborů
django-flat-theme
django-taggit
django-autocomplete-light>=3.9.0
django-crispy-forms
django-imagekit
django-polymorphic
django-sitetree
django_reverse_admin
django-taggit # Taggy v djangu (speciálně zaměření problémů)
django-autocomplete-light>=3.9.0 # Automatické doplňování (problémů, účastníků, …) ve formulářích
django-imagekit # Všechny možné obrázky v Djangu
django-polymorphic # Polymorfismus na django modelech (hlavně Problém nebo treenode)
django-sitetree # Struktura stránek, hlavně pro meníčko
django_reverse_admin # Lepší handlování OneToOne fieldů v adminu
django-rest-framework
django-webpack-loader
django-rest-polymorphic
# Comments
django-contrib-comments
# debug tools/extensions
django-debug-toolbar

6
seminar/templates/seminar/archiv/problem.html

@ -1,7 +1,5 @@
{% extends "base.html" %}
{% load comments %}
{% block content %}
<div {% if not problem.verejne and user.je_org %}class="mam-org-only"{% endif %}>
{% block problem %}
@ -13,10 +11,6 @@
<h2>Text - org</h2>
{{ problem.text_org |safe }}
<h2>Diskuse - org</h2>
{% render_comment_list for object %}
{% render_comment_form for object %}
</div>
{% endif %}

1
seminar/templatetags/utils.py

@ -1,7 +1,6 @@
from django import template
from django.utils.safestring import mark_safe
from datetime import datetime, timedelta
from pytz import timezone
from mamweb.settings import TIME_ZONE
import logging
register = template.Library()

5
seminar/testutils.py

@ -4,7 +4,6 @@ import datetime
from django.contrib.auth.models import Permission
from django.contrib.auth.models import Group
from pytz import timezone
import random
import lorem
import django.contrib.auth
@ -177,13 +176,13 @@ def gen_organizatori(rnd, osoby, last_rocnik):
year=1993 + pusobnost,
month=rnd.randint(1, 12),
day=rnd.randint(1, 28),
tzinfo=timezone('CET'),
tzinfo=datetime.timezone.utc,
)
do = datetime.datetime(
year=od.year + rnd.randint(1, 6),
month=rnd.randint(1, 12),
day=rnd.randint(1, 28),
tzinfo=timezone('CET'),
tzinfo=datetime.timezone.utc,
)
#aktualni organizatori jeste nemaji vyplnene organizuje_do

9
treenode/templates/treenode/orphanage.html

@ -1,19 +1,10 @@
{% extends "seminar/archiv/base.html" %}
{% load static %}
{% load sekizai_tags %}
{# toto z nejakeho duvodu nefunguje #}
{% addtoblock css %}
dfsdfs
<link rel="stylesheet" type="text/css" href="{% static 'css/mamweb-dev.css' %}" />
{% endaddtoblock "css" %}
{% block custom_css %}
<link rel="stylesheet" type="text/css" href="{% static 'css/mamweb-dev.css' %}" />
{% endblock custom_css %}
{% load comments %}
{% block content %}
<ul>
{% for obj in object_list %}

Loading…
Cancel
Save