Compare commits
No commits in common. "b8f2e1da3bf0cbc43f433b741b0db7ca93a7ddaf" and "824a4d9eb3e313186399149935b75ab05a3e6677" have entirely different histories.
b8f2e1da3b
...
824a4d9eb3
9 changed files with 65 additions and 17 deletions
|
@ -87,6 +87,7 @@ 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',
|
||||
|
@ -109,6 +110,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.auth',
|
||||
|
||||
# Utilities
|
||||
'sekizai',
|
||||
'reversion',
|
||||
'django_countries',
|
||||
'solo',
|
||||
|
@ -118,6 +120,9 @@ INSTALLED_APPS = (
|
|||
'dal',
|
||||
'dal_select2',
|
||||
|
||||
'crispy_forms',
|
||||
'django_comments',
|
||||
|
||||
'django.contrib.flatpages',
|
||||
'django.contrib.humanize',
|
||||
|
||||
|
|
|
@ -199,6 +199,15 @@ 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*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% load static %}
|
||||
{% load static sekizai_tags %}
|
||||
{% load sitetree %}
|
||||
<!DOCTYPE html>
|
||||
<html lang='cs'>
|
||||
|
@ -7,6 +7,7 @@
|
|||
<title>{% block title %}{% block nadpis1a %}🦊{% endblock %} | Korespondenční seminář M&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">
|
||||
|
@ -188,6 +189,6 @@
|
|||
walkText(document.body);
|
||||
</script>
|
||||
{% endif %}
|
||||
{% block js %}{% endblock %}
|
||||
{% render_block "js" %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -13,6 +13,7 @@ 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
|
||||
|
@ -61,6 +62,9 @@ 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)),
|
||||
|
||||
|
|
|
@ -1,31 +1,43 @@
|
|||
-c constraints.txt
|
||||
# basic libs
|
||||
|
||||
psycopg2 # PostgreSQL adaptér
|
||||
ipython # Interaktivní shell
|
||||
Unidecode # Přepisuje unicode do ASCII (např. soubory nebo e-maily)
|
||||
psycopg2
|
||||
html5lib
|
||||
ipython
|
||||
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-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-mptt
|
||||
django-reversion
|
||||
django-sekizai
|
||||
django-countries
|
||||
django-solo
|
||||
django-ckeditor
|
||||
django-cleanup # Uklízí media/ od smazaných „databázových“ souborů
|
||||
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-flat-theme
|
||||
django-taggit
|
||||
django-autocomplete-light>=3.9.0
|
||||
django-crispy-forms
|
||||
django-imagekit
|
||||
django-polymorphic
|
||||
django-sitetree
|
||||
django_reverse_admin
|
||||
django-rest-framework
|
||||
django-webpack-loader
|
||||
django-rest-polymorphic
|
||||
|
||||
# Comments
|
||||
django-contrib-comments
|
||||
|
||||
# debug tools/extensions
|
||||
|
||||
django-debug-toolbar
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% load comments %}
|
||||
|
||||
{% block content %}
|
||||
<div {% if not problem.verejne and user.je_org %}class="mam-org-only"{% endif %}>
|
||||
{% block problem %}
|
||||
|
@ -11,6 +13,10 @@
|
|||
<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,6 +1,7 @@
|
|||
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()
|
||||
|
|
|
@ -4,6 +4,7 @@ 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
|
||||
|
@ -176,13 +177,13 @@ def gen_organizatori(rnd, osoby, last_rocnik):
|
|||
year=1993 + pusobnost,
|
||||
month=rnd.randint(1, 12),
|
||||
day=rnd.randint(1, 28),
|
||||
tzinfo=datetime.timezone.utc,
|
||||
tzinfo=timezone('CET'),
|
||||
)
|
||||
do = datetime.datetime(
|
||||
year=od.year + rnd.randint(1, 6),
|
||||
month=rnd.randint(1, 12),
|
||||
day=rnd.randint(1, 28),
|
||||
tzinfo=datetime.timezone.utc,
|
||||
tzinfo=timezone('CET'),
|
||||
)
|
||||
#aktualni organizatori jeste nemaji vyplnene organizuje_do
|
||||
|
||||
|
|
|
@ -1,10 +1,19 @@
|
|||
{% 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…
Reference in a new issue