Compare commits
477 commits
upgrade_do
...
master
Author | SHA1 | Date | |
---|---|---|---|
ef9d51d922 | |||
ca5e6728dd | |||
7563dd728c | |||
174087edc7 | |||
4906f82365 | |||
41032be9eb | |||
422caadb9e | |||
aa997bfcd8 | |||
1a2bef328b | |||
a84df1909b | |||
0724030bef | |||
833893f233 | |||
a7746cddda | |||
0d67b5ff83 | |||
071c66ee10 | |||
1bee36d9b6 | |||
aa364b3f49 | |||
9a11491dcc | |||
a97071cd03 | |||
9c4c60765e | |||
d67d2f372b | |||
65ec9bfaed | |||
7038de2e25 | |||
c43575d8d2 | |||
8d6b352545 | |||
51eeffd0c5 | |||
42d57e7b42 | |||
edde41e1ab | |||
6ea212cdf8 | |||
|
497bb054ee | ||
e9451ed62e | |||
|
e87b84b028 | ||
ddd12b684d | |||
eb2b861d48 | |||
9020f5551d | |||
ca462289a9 | |||
80b20f5290 | |||
dbe8c39b37 | |||
0aee5b9bdb | |||
aee7637fcf | |||
5bf8df0218 | |||
5853b243dd | |||
|
5f87045b31 | ||
|
36b261580c | ||
|
3920ac72aa | ||
dc91ef571f | |||
f0fbd8021f | |||
3d035b994a | |||
db3dd39696 | |||
e0e1dfda41 | |||
|
44766efe2a | ||
d129f8a764 | |||
5b330567f8 | |||
e6a21a5f1b | |||
042246e948 | |||
e224ee66a7 | |||
5ccb94d155 | |||
fa00652a69 | |||
036c68bc2a | |||
fcc2c7c374 | |||
1b755ad1f7 | |||
ad5a242f8d | |||
6186914a7c | |||
7a781e463f | |||
2dbbb588d0 | |||
eada7920f0 | |||
6a7e4b1a39 | |||
5883a5cd28 | |||
7e8092c30c | |||
f01a808ac2 | |||
c8dd54e8ba | |||
|
f2825a97cf | ||
0f6f6a85b6 | |||
502588fd3a | |||
b4b6c7c0ce | |||
0e83f96318 | |||
e660a96df2 | |||
854c902322 | |||
024f8e0a80 | |||
bf726df117 | |||
227d438ebd | |||
71948383d2 | |||
6df9665af3 | |||
c1938c8ff7 | |||
4536c56a83 | |||
8156f7828e | |||
f5c2e22121 | |||
62a42675f8 | |||
a372aa1bc2 | |||
d0cb46b658 | |||
ac6c41cc88 | |||
1c146ac5c3 | |||
527a7b3ea6 | |||
e4a72940e8 | |||
7b3708d7ab | |||
c0825691a6 | |||
b606f03191 | |||
|
461cfa4253 | ||
|
a2517abade | ||
|
51618e0d89 | ||
|
9b14e4a333 | ||
|
8283b530e9 | ||
|
e10747aa9f | ||
|
8ae19988b1 | ||
|
2659d72d2e | ||
007332804e | |||
7f21d10c26 | |||
dc0ff80632 | |||
07d1505e2a | |||
9ca5967261 | |||
eb6eb2d6fb | |||
28fef9a393 | |||
f8b1f0978c | |||
5f931c49a5 | |||
|
5c7710ed3a | ||
6cdc37e80b | |||
8fd582d194 | |||
27a16719be | |||
87a76b17ef | |||
|
ad9a496cee | ||
|
26d37d96f7 | ||
|
062f70e947 | ||
5db14ea242 | |||
|
92c05342fb | ||
b8f377b15d | |||
a6085a64f4 | |||
c71195fba1 | |||
9ee82f72a7 | |||
ce83247fe0 | |||
46a8f136fa | |||
e0dc75763c | |||
788e8d22a2 | |||
11eb3c3665 | |||
446515a52e | |||
|
c7fe1cb386 | ||
|
07e9c8b7e4 | ||
|
10a824719b | ||
|
d288fefecc | ||
|
130907174d | ||
|
33381b4307 | ||
c7910ed72a | |||
35fa97d828 | |||
35131c96ec | |||
acdadc06ab | |||
2ae906495d | |||
|
49e93025c0 | ||
|
d1172b9d38 | ||
|
792a8fa4dc | ||
622b632773 | |||
91b6220f24 | |||
bb0cf871ec | |||
3db6231a77 | |||
d5d55d76a9 | |||
0423bce762 | |||
f9a28689b0 | |||
7108702e36 | |||
e443ecf33d | |||
8d846647f6 | |||
8ff66cb631 | |||
227b83b701 | |||
192f5d2ee7 | |||
77d158a3a7 | |||
05e6e5fb59 | |||
fbd5087c02 | |||
8dca676edc | |||
ffcc2e04a3 | |||
b491dcff7e | |||
592ae29d35 | |||
133c487637 | |||
9f421e9d77 | |||
e87bbe6048 | |||
6ec2a10bf5 | |||
c45bf88d40 | |||
733484b503 | |||
e250f1d5dc | |||
d8d37adc1f | |||
1b01fe54d2 | |||
b41b912aa4 | |||
348096024e | |||
d952ab13a5 | |||
bf748b55ee | |||
6a781323e0 | |||
0b0a939de5 | |||
c34716e134 | |||
85c3969c50 | |||
18364eb531 | |||
95ab0ee1dc | |||
731c795ee6 | |||
31b7cbb8d7 | |||
ba2ea74a04 | |||
a6eebb2d59 | |||
be8c9810e4 | |||
47894ce335 | |||
5f7ec853fa | |||
0cab9a8286 | |||
9920465f99 | |||
99a1fd9a9f | |||
431978e626 | |||
69635b4234 | |||
f0b642ca44 | |||
8dc3a2ba98 | |||
8fef21900c | |||
1d36cd0761 | |||
e21a93f9e7 | |||
ead2a4ede3 | |||
5f9bda9afe | |||
0817012130 | |||
7a6a7cb0f5 | |||
75344c2c3a | |||
350623c6ac | |||
2bb732959a | |||
d55199d6ae | |||
05a710185c | |||
4a3681b1a6 | |||
ccf3ec07f7 | |||
b44bdadb0a | |||
a6220e8d50 | |||
27beb34153 | |||
62a65af40e | |||
036af434c6 | |||
d1db1b952f | |||
ddda7052ae | |||
0fa2fb8e2b | |||
b094347b7c | |||
3188e024da | |||
69019baf4e | |||
ec474530e4 | |||
f564d4e145 | |||
49aea5b8b4 | |||
|
ca8e8506b3 | ||
|
2444e5f985 | ||
476f8263d4 | |||
1ce9cb445f | |||
6225630f9f | |||
0bebee5329 | |||
|
3c3b9f755a | ||
40ca76d414 | |||
cf3c9f6f80 | |||
fad2c6940d | |||
491f91cf47 | |||
|
2304a8282c | ||
|
8a5659420d | ||
|
d895cd0636 | ||
c0958d79db | |||
737c296da9 | |||
|
067cd07352 | ||
|
f75408e936 | ||
|
c917655a22 | ||
|
c78b932587 | ||
|
381c5ca3de | ||
|
15b09c23a7 | ||
7c1d9a0329 | |||
|
e431e23ad4 | ||
|
8dbb92d3a4 | ||
e06080ae31 | |||
|
6165c5916b | ||
|
bb1fb87665 | ||
|
8949424f48 | ||
37f988f478 | |||
|
a3a9c629d8 | ||
|
607129a899 | ||
|
b8328c0932 | ||
|
2ce45b3d89 | ||
|
e618d390de | ||
af9f244207 | |||
|
7e6dd72722 | ||
|
3be9578ec3 | ||
20691f483a | |||
64465a0471 | |||
|
7569447baa | ||
|
235bd096e0 | ||
|
6c59c3c2ed | ||
|
9f08ec332f | ||
|
e075a9e749 | ||
|
8c4bf4d19a | ||
|
e3771f865d | ||
|
cdc1472595 | ||
4d13b0eb25 | |||
6cc1b1fbe7 | |||
72f11a25ce | |||
3f1a570878 | |||
c21d040202 | |||
53caf7f73a | |||
ed703b10a1 | |||
|
99c0095465 | ||
b8b0c5440f | |||
|
676b94ca1b | ||
|
6ab00392cc | ||
|
5070a4d914 | ||
|
77d392f14f | ||
|
03589e484c | ||
|
8ab25545a4 | ||
|
4eb6746c75 | ||
48123a8ce2 | |||
d09a08f53f | |||
9a93f95490 | |||
fd736829c2 | |||
026efe2467 | |||
a301b122fd | |||
|
51f730fe71 | ||
|
e0d45ddf5d | ||
|
9b12681e45 | ||
|
d21ac37187 | ||
|
49f9b05285 | ||
|
a17914f49c | ||
|
b4b41b9499 | ||
|
1a3dd5d6b2 | ||
|
54db53805a | ||
|
b17b97e4e4 | ||
|
9c1c393395 | ||
|
858b5ce054 | ||
|
ace30c931e | ||
|
e083f74a83 | ||
|
53f40e193d | ||
|
9e21b2ca1a | ||
|
1f0e6cccf6 | ||
|
46f1d3d42d | ||
5eb936d891 | |||
|
a23daf8b97 | ||
|
457236c21a | ||
|
4182bd542e | ||
|
17b4a4764c | ||
|
8cc5864257 | ||
df5ae2c12a | |||
|
d4b92854c2 | ||
|
559297240d | ||
|
e3ce5efdd6 | ||
|
a1c1b9f280 | ||
|
b550857a8d | ||
|
ae8040fb04 | ||
|
7a34fced0a | ||
81494a7152 | |||
|
a1000ad2bf | ||
|
88ae103ec1 | ||
|
213d3cc7b2 | ||
|
4ecd2a7a61 | ||
|
d2926bd1a7 | ||
|
a59e2f9977 | ||
bd1d04802b | |||
8cd3250bb0 | |||
cc09980632 | |||
3363fbdc7c | |||
3f8756148d | |||
7b1e3ab58b | |||
ee7771bdb3 | |||
10c252cd16 | |||
a4a4af5f93 | |||
5048439aee | |||
14e8520b20 | |||
31ee8937f8 | |||
d469019c44 | |||
a1fa654bec | |||
81004d7cdc | |||
da705927c2 | |||
ce54684680 | |||
837986bad8 | |||
d7195a42f1 | |||
264f4d7646 | |||
5bf2df563b | |||
6d270b7af5 | |||
d41eb64ab5 | |||
805ed9204c | |||
3d2f0f08c3 | |||
9cca7beba5 | |||
c5b81871d2 | |||
52dc337a20 | |||
eec9abb9c1 | |||
c731af9ccd | |||
f5e8f5bb77 | |||
72c20d2b94 | |||
b2911d5e9f | |||
239a324a19 | |||
c0a3e3df8f | |||
b4c693a9ab | |||
c130ab8426 | |||
a72435dd72 | |||
8e1a03863f | |||
b8f2e1da3b | |||
824a4d9eb3 | |||
|
39d618834b | ||
46fd51e7d9 | |||
|
f41d5587fc | ||
8babbd988c | |||
ea5ee85e7a | |||
187ca0ec93 | |||
7a28649436 | |||
1802e90952 | |||
0f3874beb5 | |||
191177aea0 | |||
|
37586d7433 | ||
3bfdde10e8 | |||
b5de60d681 | |||
0204bd2444 | |||
3fd0c7f917 | |||
6cb41a1263 | |||
|
ca0bbb1247 | ||
|
158c0e4d90 | ||
|
f7382fb946 | ||
|
0bbb860b16 | ||
|
6a5390cdf6 | ||
|
f197261271 | ||
|
df2e4f086a | ||
ffa0c682f4 | |||
0fbfb1e3cd | |||
c55fbb9dca | |||
|
7a4213a61e | ||
|
37437b9674 | ||
2afa250df6 | |||
78866fbc93 | |||
|
a9a426ca91 | ||
|
b456b8c861 | ||
6fe9beb0f0 | |||
f457520d7d | |||
cda00bbc4c | |||
|
668546c720 | ||
e889620ddb | |||
c673d04082 | |||
36124fa69e | |||
14b3caaa04 | |||
e9782c73e4 | |||
|
93cfa504a8 | ||
29b5361545 | |||
e589564840 | |||
10c6f4be16 | |||
04e2007c3a | |||
1f7b770a5c | |||
b8eee44ed0 | |||
b36c030af5 | |||
dca7a7bedd | |||
c635b0a280 | |||
1aa389414d | |||
|
aff9a39262 | ||
|
2d416472e8 | ||
|
7e1644d5c1 | ||
b69ebcd6b6 | |||
|
002e33002c | ||
205409abc5 | |||
68d51a0bf1 | |||
0e24c1d9ad | |||
29b3271200 | |||
60346d6839 | |||
bb127832dc | |||
|
1f0d70b31e | ||
0738aedc9e | |||
d006f6ebfa | |||
bfb7a75b97 | |||
|
8a473a5097 | ||
|
f14df7b579 | ||
|
e182785e48 | ||
fb31b10d66 | |||
30ce5a0888 | |||
0c90c2bd06 | |||
|
df657953ab | ||
527c06d91e | |||
|
449a3db56b | ||
767358ca73 | |||
5b36650e6f | |||
24c790185e | |||
|
14c6706bf3 | ||
|
10b2d11249 | ||
|
3eb9c7998d | ||
|
36a7a5af5d | ||
|
844c55d5a7 | ||
|
2cf4d87c6b | ||
|
feffa99d79 | ||
|
d304e46ceb | ||
|
fe144e6de7 | ||
|
86f6d47f10 | ||
|
bef932345c | ||
|
468443e062 | ||
|
53032a49d8 | ||
|
8f2aa72f6d | ||
|
ed5e7a1d9f | ||
|
96bc21a727 | ||
|
659ad62b52 | ||
|
dd49c0e1ba | ||
|
dd5d8886ee |
12
.gitignore
vendored
|
@ -31,9 +31,15 @@ TODO
|
||||||
# reversion kvůli historii objektů v reversion
|
# reversion kvůli historii objektů v reversion
|
||||||
**/reversion
|
**/reversion
|
||||||
|
|
||||||
|
# dokumentace
|
||||||
|
docs/_build
|
||||||
|
docs/modules
|
||||||
|
|
||||||
|
# logy týracího skriptu (./checklinks.sh)
|
||||||
|
/wget.log.*
|
||||||
|
|
||||||
# pro lidi, co programují v nástrojích od JetBrains
|
# pro lidi, co programují v nástrojích od JetBrains
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
# dokumentace
|
# Mac users
|
||||||
docs/_build
|
.DS_Store
|
||||||
docs/modules
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
git hooks
|
|
||||||
=========
|
|
||||||
|
|
||||||
Kontrola stylu pythoních zdrojáků pomocí flake8. Kontrolujeme jen změny,
|
|
||||||
abychom nenutili lidi dělat nesouvisející úpravy, které by rozbíjely historii
|
|
||||||
(git blame).
|
|
||||||
|
|
||||||
pre-commit
|
|
||||||
----------
|
|
||||||
* kontrola změn před commitnutím
|
|
||||||
* instalace: lokálně zkopírovat do .git/hooks (musí být spustitelný)
|
|
||||||
|
|
||||||
update
|
|
||||||
------
|
|
||||||
* kontrola změn přicházejících s pushem
|
|
||||||
* instalace: na atreyi zkopírovat do /akce/MaM/MaMweb/mamweb.git/hooks
|
|
|
@ -1,30 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Git hook script to verify what is about to be committed.
|
|
||||||
# Checks that the changes don't introduce new flake8 errors.
|
|
||||||
|
|
||||||
TMPDIFF=`tempfile`
|
|
||||||
FLAKE8="`git rev-parse --show-toplevel`/bin/flake8"
|
|
||||||
|
|
||||||
status=0
|
|
||||||
|
|
||||||
# select only changed python files which are not migrations
|
|
||||||
changed=`git diff --cached --name-only | 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 --cached HEAD -- $changed > $TMPDIFF
|
|
||||||
|
|
||||||
# only do the check when there are some changes to be commited
|
|
||||||
# otherwise flake8 would hang waiting for input
|
|
||||||
if [ -s $TMPDIFF ] ; then
|
|
||||||
cat $TMPDIFF | $FLAKE8 --diff
|
|
||||||
status=$?
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $TMPDIFF
|
|
||||||
|
|
||||||
exit $status
|
|
|
@ -1,61 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# git update hook to check that pushed changes don't introduce new flake8
|
|
||||||
# errors
|
|
||||||
|
|
||||||
# --- Command line
|
|
||||||
refname="$1"
|
|
||||||
oldrev="$2"
|
|
||||||
newrev="$3"
|
|
||||||
|
|
||||||
# --- Safety check
|
|
||||||
if [ -z "$GIT_DIR" ]; then
|
|
||||||
echo "Don't run this script from the command line." >&2
|
|
||||||
echo " (if you want, you could supply GIT_DIR then run" >&2
|
|
||||||
echo " $0 <ref> <oldrev> <newrev>)" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
|
|
||||||
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
TMPDIR=`mktemp -d`
|
|
||||||
TMPDIFF=`tempfile`
|
|
||||||
|
|
||||||
[ $refname != "refs/heads/master" -a $refname != "refs/heads/stable" ] && exit 0
|
|
||||||
|
|
||||||
# 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}
|
|
||||||
|
|
||||||
cd ${TMPDIR}
|
|
||||||
# report only errors on lines in diff
|
|
||||||
# (if threre was flake8 installed on atrey, we could just call flake8)
|
|
||||||
/akce/MaM/WWW/mamweb-test/bin/flake8 --diff <${TMPDIFF}
|
|
||||||
status=$?
|
|
||||||
if [ $status != 0 ] ; then
|
|
||||||
echo
|
|
||||||
echo -n "Změny, které se snažíte pushnout, obsahují kód v pythonu "
|
|
||||||
echo -n "nevyhovující flake8 (viz výše). Opravte je a zkuste to znovu. "
|
|
||||||
echo -n "Nezapomeňte, že můžete editovat historii (git commit --amend, "
|
|
||||||
echo -n "git rebase -i). Pokud byste chybu příště raději odhalili už při "
|
|
||||||
echo "commitu, zkopírujte si pre-commit hook z _git_hooks do .git/hooks."
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf ${TMPDIR}
|
|
||||||
rm -f ${TMPDIFF}
|
|
||||||
|
|
||||||
exit $status
|
|
|
@ -1,8 +1,5 @@
|
||||||
"""
|
|
||||||
Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace.
|
|
||||||
"""
|
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class AesopConfig(AppConfig):
|
class AesopConfig(AppConfig):
|
||||||
name = 'aesop'
|
name = 'aesop'
|
||||||
|
verbose_name = 'Export do AESOPa'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_str
|
||||||
|
|
||||||
|
|
||||||
class OvvpFile:
|
class OvvpFile:
|
||||||
|
@ -20,7 +20,7 @@ class OvvpFile:
|
||||||
yield '\t'.join(self.columns) + '\n'
|
yield '\t'.join(self.columns) + '\n'
|
||||||
# rows
|
# rows
|
||||||
for r in self.rows:
|
for r in self.rows:
|
||||||
yield '\t'.join([force_text(r[c]) for c in self.columns]) + '\n'
|
yield '\t'.join([force_str(r[c]) for c in self.columns]) + '\n'
|
||||||
|
|
||||||
def to_string(self):
|
def to_string(self):
|
||||||
return ''.join(self.to_lines())
|
return ''.join(self.to_lines())
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
"""
|
|
||||||
Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují:
|
|
||||||
|
|
||||||
- ``aesop-export/mam-rocnik-<int:prvni_rok>.csv`` (seminar_export_rocnik) :class:`~aesop.views.ExportRocnikView`
|
|
||||||
- ``aesop-export/mam-sous-<str:datum_zacatku>.csv`` (seminar_export_sous) :class:`~aesop.views.ExportSousView`
|
|
||||||
- ``aesop-export/index.csv`` (seminar_export_index) :class:`~aesop.views.ExportIndexView`
|
|
||||||
"""
|
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
from aesop import views
|
from aesop import views
|
||||||
|
|
||||||
|
@ -12,16 +5,16 @@ urlpatterns = [
|
||||||
path(
|
path(
|
||||||
'aesop-export/mam-rocnik-<int:prvni_rok>.csv',
|
'aesop-export/mam-rocnik-<int:prvni_rok>.csv',
|
||||||
views.ExportRocnikView.as_view(),
|
views.ExportRocnikView.as_view(),
|
||||||
name='seminar_export_rocnik'
|
name='aesop_export_rocnik'
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
'aesop-export/mam-sous-<str:datum_zacatku>.csv',
|
'aesop-export/mam-sous-<str:datum_zacatku>.csv',
|
||||||
views.ExportSousView.as_view(),
|
views.ExportSousView.as_view(),
|
||||||
name='seminar_export_sous'
|
name='aesop_export_sous'
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
'aesop-export/index.csv',
|
'aesop-export/index.csv',
|
||||||
views.ExportIndexView.as_view(),
|
views.ExportIndexView.as_view(),
|
||||||
name='seminar_export_index'
|
name='aesop_export_index'
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_str
|
||||||
|
|
||||||
from aesop.ovvpfile import OvvpFile
|
from aesop.ovvpfile import OvvpFile
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ def default_ovvpfile(event, rocnik):
|
||||||
of = OvvpFile()
|
of = OvvpFile()
|
||||||
of.headers['version'] = '1'
|
of.headers['version'] = '1'
|
||||||
of.headers['event'] = event
|
of.headers['event'] = event
|
||||||
of.headers['year'] = force_text(rocnik.prvni_rok)
|
of.headers['year'] = force_str(rocnik.prvni_rok)
|
||||||
of.headers['date'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
of.headers['date'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
of.headers['id-scope'] = 'mam'
|
of.headers['id-scope'] = 'mam'
|
||||||
of.headers['id-generation'] = '1'
|
of.headers['id-generation'] = '1'
|
||||||
|
|
|
@ -1,28 +1,24 @@
|
||||||
"""
|
|
||||||
Soubor sloužící k deklaraci jednotlivých „views“ (nejčastěji funkce beroucí request
|
|
||||||
a vracející :func:`django.shortcuts.render` respektive nějakou response, nebo
|
|
||||||
třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic`)
|
|
||||||
"""
|
|
||||||
import django
|
import django
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_str
|
||||||
|
|
||||||
from .utils import default_ovvpfile
|
from .utils import default_ovvpfile
|
||||||
from seminar.models import Rocnik, Soustredeni
|
from soustredeni.models import Soustredeni
|
||||||
|
from tvorba.models import Rocnik
|
||||||
from vysledkovky import utils
|
from vysledkovky import utils
|
||||||
from seminar.utils import aktivniResitele
|
from tvorba.utils import aktivniResitele
|
||||||
|
|
||||||
class ExportIndexView(generic.View):
|
class ExportIndexView(generic.View):
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
ls = []
|
ls = []
|
||||||
for r in Rocnik.objects.filter(exportovat = True):
|
for r in Rocnik.objects.filter(exportovat = True):
|
||||||
url = reverse('seminar_export_rocnik', kwargs={'prvni_rok': r.prvni_rok})
|
url = reverse('aesop_export_rocnik', kwargs={'prvni_rok': r.prvni_rok})
|
||||||
ls.append(url.split('/')[-1])
|
ls.append(url.split('/')[-1])
|
||||||
for s in Soustredeni.objects.filter(exportovat = True):
|
for s in Soustredeni.objects.filter(exportovat = True):
|
||||||
url = reverse('seminar_export_sous', kwargs={'datum_zacatku': s.datum_zacatku.isoformat()})
|
url = reverse('aesop_export_sous', kwargs={'datum_zacatku': s.datum_zacatku.isoformat()})
|
||||||
ls.append(url.split('/')[-1])
|
ls.append(url.split('/')[-1])
|
||||||
|
|
||||||
return HttpResponse('\n'.join(ls) + '\n', content_type='text/plain; charset=utf-8')
|
return HttpResponse('\n'.join(ls) + '\n', content_type='text/plain; charset=utf-8')
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
"""
|
|
||||||
Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace.
|
|
||||||
"""
|
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class ApiConfig(AppConfig):
|
class ApiConfig(AppConfig):
|
||||||
name = 'api'
|
name = 'api'
|
||||||
|
verbose_name = 'Různá webová API'
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
from django.test import TestCase
|
from django.test import TestCase, tag
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
import seminar.models as m
|
from personalni.models import Skola
|
||||||
import seminar.views as v
|
from personalni.utils import sync_skoly
|
||||||
from seminar.utils import sync_skoly
|
|
||||||
|
|
||||||
|
@tag('stejny-model-na-produkci')
|
||||||
class OrgSkolyAutocompleteTestCase(TestCase):
|
class OrgSkolyAutocompleteTestCase(TestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
@ -48,7 +48,7 @@ class OrgSkolyAutocompleteTestCase(TestCase):
|
||||||
"""Testuje, že pro každého orga je jeho škola ve výsledném QuerySetu"""
|
"""Testuje, že pro každého orga je jeho škola ve výsledném QuerySetu"""
|
||||||
for pfx, id in self.spravna_data:
|
for pfx, id in self.spravna_data:
|
||||||
with self.subTest(prefix=pfx, spravne_id=id):
|
with self.subTest(prefix=pfx, spravne_id=id):
|
||||||
spravna_skola = m.Skola.objects.get(id=id)
|
spravna_skola = Skola.objects.get(id=id)
|
||||||
# Zeptáme se view, co si myslí
|
# Zeptáme se view, co si myslí
|
||||||
resp = self.client.get(reverse('autocomplete_skola')+'?q='+pfx).json()
|
resp = self.client.get(reverse('autocomplete_skola')+'?q='+pfx).json()
|
||||||
ids = [int(x['id']) for x in resp['results']]
|
ids = [int(x['id']) for x in resp['results']]
|
||||||
|
|
16
api/urls.py
|
@ -1,18 +1,6 @@
|
||||||
"""
|
|
||||||
Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují:
|
|
||||||
|
|
||||||
- ``api/expor/skoly/`` (export_skoly) :func:`~api.views.exports.exportSkolView`
|
|
||||||
- ``api/autocomplete/skola/`` (autocomplete_skola) :class:`~api.views.autocomplete.SkolaAutocomplete`
|
|
||||||
- ``api/autocomplete/resitel/`` (autocomplete_resitel) :class:`~api.views.autocomplete.ResitelAutocomplete`
|
|
||||||
- ``api/autocomplete/problem/odevzdatelny`` (autocomplete_problem_odevzdatelny) :class:`~api.views.autocomplete.OdevzdatelnyProblemAutocomplete`
|
|
||||||
|
|
||||||
Na autocomplete v3 čeká:
|
|
||||||
|
|
||||||
- ``autocomplete/organizatori/`` (seminar_autocomplete_organizator) :class:`~api.views.autocomplete.OrganizatorAutocomplete`
|
|
||||||
"""
|
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
from . import views
|
from . import views
|
||||||
from seminar.utils import org_required
|
from personalni.utils import org_required
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# Export škol
|
# Export škol
|
||||||
|
@ -29,5 +17,5 @@ urlpatterns = [
|
||||||
# Ceka na autocomplete v3
|
# Ceka na autocomplete v3
|
||||||
# path('autocomplete/organizatori/',
|
# path('autocomplete/organizatori/',
|
||||||
# org_member_required(views.OrganizatorAutocomplete.as_view()),
|
# org_member_required(views.OrganizatorAutocomplete.as_view()),
|
||||||
# name='seminar_autocomplete_organizator')
|
# name='autocomplete_organizator')
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,7 +1,2 @@
|
||||||
"""
|
|
||||||
Soubory sloužící k deklaraci jednotlivých „views“ (nejčastěji funkce beroucí request
|
|
||||||
a vracející :func:`django.shortcuts.render` respektive nějakou response, nebo
|
|
||||||
třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic`)
|
|
||||||
"""
|
|
||||||
from .autocomplete import *
|
from .autocomplete import *
|
||||||
from .exports import *
|
from .exports import *
|
||||||
|
|
|
@ -5,7 +5,9 @@ from dal import autocomplete
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
|
||||||
import seminar.models as m
|
from personalni.models import Skola, Resitel
|
||||||
|
from tvorba.models import Problem
|
||||||
|
from various.models import Nastaveni
|
||||||
from .helpers import LoginRequiredAjaxMixin
|
from .helpers import LoginRequiredAjaxMixin
|
||||||
|
|
||||||
# TODO filosofie - zkratky, jak v databázi, tak ve vyhledávání (SPŠE, GASOŠ, Kpt., soukr)
|
# TODO filosofie - zkratky, jak v databázi, tak ve vyhledávání (SPŠE, GASOŠ, Kpt., soukr)
|
||||||
|
@ -13,7 +15,7 @@ class SkolaAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
""" View k :mod:`dal.autocomplete` pro vyhledávání škol hlavně při registraci. """
|
""" View k :mod:`dal.autocomplete` pro vyhledávání škol hlavně při registraci. """
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
# Don't forget to filter out results depending on the visitor !
|
# Don't forget to filter out results depending on the visitor !
|
||||||
qs = m.Skola.objects.all()
|
qs = Skola.objects.all()
|
||||||
if self.q:
|
if self.q:
|
||||||
words = self.q.split(' ') #TODO re split podle bileho znaku
|
words = self.q.split(' ') #TODO re split podle bileho znaku
|
||||||
partq = Q()
|
partq = Q()
|
||||||
|
@ -31,7 +33,7 @@ class SkolaAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
class ResitelAutocomplete(LoginRequiredAjaxMixin,autocomplete.Select2QuerySetView):
|
class ResitelAutocomplete(LoginRequiredAjaxMixin,autocomplete.Select2QuerySetView):
|
||||||
""" View k :mod:`dal.autocomplete` pro vyhledávání řešitelů především v odevzdávátku. """
|
""" View k :mod:`dal.autocomplete` pro vyhledávání řešitelů především v odevzdávátku. """
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = m.Resitel.objects.all()
|
qs = Resitel.objects.all()
|
||||||
if self.q:
|
if self.q:
|
||||||
parts = self.q.split()
|
parts = self.q.split()
|
||||||
query = Q()
|
query = Q()
|
||||||
|
@ -51,8 +53,8 @@ class PublicResitelAutocomplete(LoginRequiredAjaxMixin, autocomplete.Select2Quer
|
||||||
především v odevzdávátku.
|
především v odevzdávátku.
|
||||||
"""
|
"""
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
letos = m.Nastaveni.get_solo().aktualni_rocnik
|
letos = Nastaveni.get_solo().aktualni_rocnik
|
||||||
qs = m.Resitel.objects.filter(
|
qs = Resitel.objects.filter(
|
||||||
rok_maturity__gte=letos.druhy_rok()
|
rok_maturity__gte=letos.druhy_rok()
|
||||||
).filter(
|
).filter(
|
||||||
prezdivka_resitele__isnull=False
|
prezdivka_resitele__isnull=False
|
||||||
|
@ -70,7 +72,7 @@ class PublicResitelAutocomplete(LoginRequiredAjaxMixin, autocomplete.Select2Quer
|
||||||
class OdevzdatelnyProblemAutocomplete(autocomplete.Select2QuerySetView):
|
class OdevzdatelnyProblemAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
""" View k :mod:`dal.autocomplete` pro vyhledávání problémů především v odevzdávátku. """
|
""" View k :mod:`dal.autocomplete` pro vyhledávání problémů především v odevzdávátku. """
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = m.Problem.objects.filter(stav=m.Problem.STAV_ZADANY)
|
qs = Problem.objects.filter(stav=Problem.STAV_ZADANY)
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(
|
qs = qs.filter(
|
||||||
Q(nazev__icontains=self.q))
|
Q(nazev__icontains=self.q))
|
||||||
|
@ -87,12 +89,12 @@ class ProblemAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
""" View k :mod:`dal.autocomplete` pro vyhledávání problémů především v odevzdávátku. """
|
""" View k :mod:`dal.autocomplete` pro vyhledávání problémů především v odevzdávátku. """
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
# FIXME i starší úlohy
|
# FIXME i starší úlohy
|
||||||
nastaveni = get_object_or_404(m.Nastaveni)
|
nastaveni = get_object_or_404(Nastaveni)
|
||||||
rocnik = nastaveni.aktualni_rocnik
|
rocnik = nastaveni.aktualni_rocnik
|
||||||
temaQ = Q(Tema___rocnik = rocnik)
|
temaQ = Q(Tema___rocnik = rocnik)
|
||||||
ulohaQ = Q(Uloha___cislo_zadani__rocnik=rocnik)
|
ulohaQ = Q(Uloha___cislo_zadani__rocnik=rocnik)
|
||||||
clanekQ = Q(Clanek___cislo__rocnik=rocnik)
|
clanekQ = Q(Clanek___cislo__rocnik=rocnik)
|
||||||
qs = m.Problem.objects.filter(temaQ | ulohaQ | clanekQ).order_by("-stav", "nazev")
|
qs = Problem.objects.filter(temaQ | ulohaQ | clanekQ).order_by("-stav", "nazev")
|
||||||
if self.q:
|
if self.q:
|
||||||
qs = qs.filter(
|
qs = qs.filter(
|
||||||
Q(nazev__icontains=self.q))
|
Q(nazev__icontains=self.q))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import seminar.models as m
|
import personalni.models as m
|
||||||
from django.core import serializers as ser
|
from django.core import serializers as ser
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
def exportSkolView(request):
|
def exportSkolView(request):
|
||||||
|
|
645
data/groups.json
Normal file
|
@ -0,0 +1,645 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"fields": {
|
||||||
|
"name": "org",
|
||||||
|
"permissions": [
|
||||||
|
[
|
||||||
|
"org",
|
||||||
|
"auth",
|
||||||
|
"user"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_flatpage",
|
||||||
|
"flatpages",
|
||||||
|
"flatpage"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_flatpage",
|
||||||
|
"flatpages",
|
||||||
|
"flatpage"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_flatpage",
|
||||||
|
"flatpages",
|
||||||
|
"flatpage"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_flatpage",
|
||||||
|
"flatpages",
|
||||||
|
"flatpage"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_galerie",
|
||||||
|
"galerie",
|
||||||
|
"galerie"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_galerie",
|
||||||
|
"galerie",
|
||||||
|
"galerie"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_galerie",
|
||||||
|
"galerie",
|
||||||
|
"galerie"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_galerie",
|
||||||
|
"galerie",
|
||||||
|
"galerie"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_obrazek",
|
||||||
|
"galerie",
|
||||||
|
"obrazek"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_obrazek",
|
||||||
|
"galerie",
|
||||||
|
"obrazek"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_obrazek",
|
||||||
|
"galerie",
|
||||||
|
"obrazek"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_obrazek",
|
||||||
|
"galerie",
|
||||||
|
"obrazek"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_fotkaheader",
|
||||||
|
"header_fotky",
|
||||||
|
"fotkaheader"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_fotkaheader",
|
||||||
|
"header_fotky",
|
||||||
|
"fotkaheader"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_fotkaheader",
|
||||||
|
"header_fotky",
|
||||||
|
"fotkaheader"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_fotkaurlvazba",
|
||||||
|
"header_fotky",
|
||||||
|
"fotkaurlvazba"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_fotkaurlvazba",
|
||||||
|
"header_fotky",
|
||||||
|
"fotkaurlvazba"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_fotkaurlvazba",
|
||||||
|
"header_fotky",
|
||||||
|
"fotkaurlvazba"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_komentar",
|
||||||
|
"korektury",
|
||||||
|
"komentar"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_komentar",
|
||||||
|
"korektury",
|
||||||
|
"komentar"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_komentar",
|
||||||
|
"korektury",
|
||||||
|
"komentar"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_komentar",
|
||||||
|
"korektury",
|
||||||
|
"komentar"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_korekturovanepdf",
|
||||||
|
"korektury",
|
||||||
|
"korekturovanepdf"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_korekturovanepdf",
|
||||||
|
"korektury",
|
||||||
|
"korekturovanepdf"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_korekturovanepdf",
|
||||||
|
"korektury",
|
||||||
|
"korekturovanepdf"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_korekturovanepdf",
|
||||||
|
"korektury",
|
||||||
|
"korekturovanepdf"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_oprava",
|
||||||
|
"korektury",
|
||||||
|
"oprava"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_oprava",
|
||||||
|
"korektury",
|
||||||
|
"oprava"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_oprava",
|
||||||
|
"korektury",
|
||||||
|
"oprava"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_oprava",
|
||||||
|
"korektury",
|
||||||
|
"oprava"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_novinky",
|
||||||
|
"novinky",
|
||||||
|
"novinky"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_novinky",
|
||||||
|
"novinky",
|
||||||
|
"novinky"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_novinky",
|
||||||
|
"novinky",
|
||||||
|
"novinky"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_novinky",
|
||||||
|
"novinky",
|
||||||
|
"novinky"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_organizator",
|
||||||
|
"personalni",
|
||||||
|
"organizator"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_organizator",
|
||||||
|
"personalni",
|
||||||
|
"organizator"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_osoba",
|
||||||
|
"personalni",
|
||||||
|
"osoba"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_osoba",
|
||||||
|
"personalni",
|
||||||
|
"osoba"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_prijemce",
|
||||||
|
"personalni",
|
||||||
|
"prijemce"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_prijemce",
|
||||||
|
"personalni",
|
||||||
|
"prijemce"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_prijemce",
|
||||||
|
"personalni",
|
||||||
|
"prijemce"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_prijemce",
|
||||||
|
"personalni",
|
||||||
|
"prijemce"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_resitel",
|
||||||
|
"personalni",
|
||||||
|
"resitel"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_resitel",
|
||||||
|
"personalni",
|
||||||
|
"resitel"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_skola",
|
||||||
|
"personalni",
|
||||||
|
"skola"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_skola",
|
||||||
|
"personalni",
|
||||||
|
"skola"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_skola",
|
||||||
|
"personalni",
|
||||||
|
"skola"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_skola",
|
||||||
|
"personalni",
|
||||||
|
"skola"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_hlasovani",
|
||||||
|
"prednasky",
|
||||||
|
"hlasovani"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_hlasovani",
|
||||||
|
"prednasky",
|
||||||
|
"hlasovani"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_hlasovani",
|
||||||
|
"prednasky",
|
||||||
|
"hlasovani"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_hlasovani",
|
||||||
|
"prednasky",
|
||||||
|
"hlasovani"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_prednaska",
|
||||||
|
"prednasky",
|
||||||
|
"prednaska"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_prednaska",
|
||||||
|
"prednasky",
|
||||||
|
"prednaska"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_prednaska",
|
||||||
|
"prednasky",
|
||||||
|
"prednaska"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_prednaska",
|
||||||
|
"prednasky",
|
||||||
|
"prednaska"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_seznam",
|
||||||
|
"prednasky",
|
||||||
|
"seznam"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_seznam",
|
||||||
|
"prednasky",
|
||||||
|
"seznam"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_seznam",
|
||||||
|
"prednasky",
|
||||||
|
"seznam"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_seznam",
|
||||||
|
"prednasky",
|
||||||
|
"seznam"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_konfera",
|
||||||
|
"soustredeni",
|
||||||
|
"konfera"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_konfera",
|
||||||
|
"soustredeni",
|
||||||
|
"konfera"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_konfera",
|
||||||
|
"soustredeni",
|
||||||
|
"konfera"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_konfera",
|
||||||
|
"soustredeni",
|
||||||
|
"konfera"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_konfery_ucastnici",
|
||||||
|
"soustredeni",
|
||||||
|
"konfery_ucastnici"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_konfery_ucastnici",
|
||||||
|
"soustredeni",
|
||||||
|
"konfery_ucastnici"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_konfery_ucastnici",
|
||||||
|
"soustredeni",
|
||||||
|
"konfery_ucastnici"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_konfery_ucastnici",
|
||||||
|
"soustredeni",
|
||||||
|
"konfery_ucastnici"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_soustredeni",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_soustredeni",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_soustredeni",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_soustredeni",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_soustredeni_organizatori",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni_organizatori"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_soustredeni_organizatori",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni_organizatori"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_soustredeni_organizatori",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni_organizatori"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_soustredeni_organizatori",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni_organizatori"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_soustredeni_ucastnici",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni_ucastnici"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_soustredeni_ucastnici",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni_ucastnici"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_soustredeni_ucastnici",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni_ucastnici"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_soustredeni_ucastnici",
|
||||||
|
"soustredeni",
|
||||||
|
"soustredeni_ucastnici"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_tag",
|
||||||
|
"taggit",
|
||||||
|
"tag"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_tag",
|
||||||
|
"taggit",
|
||||||
|
"tag"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_tag",
|
||||||
|
"taggit",
|
||||||
|
"tag"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_tag",
|
||||||
|
"taggit",
|
||||||
|
"tag"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_taggeditem",
|
||||||
|
"taggit",
|
||||||
|
"taggeditem"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_taggeditem",
|
||||||
|
"taggit",
|
||||||
|
"taggeditem"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_taggeditem",
|
||||||
|
"taggit",
|
||||||
|
"taggeditem"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_taggeditem",
|
||||||
|
"taggit",
|
||||||
|
"taggeditem"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_cislo",
|
||||||
|
"tvorba",
|
||||||
|
"cislo"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_cislo",
|
||||||
|
"tvorba",
|
||||||
|
"cislo"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_cislo",
|
||||||
|
"tvorba",
|
||||||
|
"cislo"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_cislo",
|
||||||
|
"tvorba",
|
||||||
|
"cislo"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_clanek",
|
||||||
|
"tvorba",
|
||||||
|
"clanek"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_clanek",
|
||||||
|
"tvorba",
|
||||||
|
"clanek"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_clanek",
|
||||||
|
"tvorba",
|
||||||
|
"clanek"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_clanek",
|
||||||
|
"tvorba",
|
||||||
|
"clanek"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_deadline",
|
||||||
|
"tvorba",
|
||||||
|
"deadline"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_deadline",
|
||||||
|
"tvorba",
|
||||||
|
"deadline"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_deadline",
|
||||||
|
"tvorba",
|
||||||
|
"deadline"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_pohadka",
|
||||||
|
"tvorba",
|
||||||
|
"pohadka"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_pohadka",
|
||||||
|
"tvorba",
|
||||||
|
"pohadka"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_pohadka",
|
||||||
|
"tvorba",
|
||||||
|
"pohadka"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_pohadka",
|
||||||
|
"tvorba",
|
||||||
|
"pohadka"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_problem",
|
||||||
|
"tvorba",
|
||||||
|
"problem"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_problem",
|
||||||
|
"tvorba",
|
||||||
|
"problem"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_problem",
|
||||||
|
"tvorba",
|
||||||
|
"problem"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_problem",
|
||||||
|
"tvorba",
|
||||||
|
"problem"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_rocnik",
|
||||||
|
"tvorba",
|
||||||
|
"rocnik"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_rocnik",
|
||||||
|
"tvorba",
|
||||||
|
"rocnik"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_rocnik",
|
||||||
|
"tvorba",
|
||||||
|
"rocnik"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_rocnik",
|
||||||
|
"tvorba",
|
||||||
|
"rocnik"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_tema",
|
||||||
|
"tvorba",
|
||||||
|
"tema"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_tema",
|
||||||
|
"tvorba",
|
||||||
|
"tema"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_tema",
|
||||||
|
"tvorba",
|
||||||
|
"tema"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_tema",
|
||||||
|
"tvorba",
|
||||||
|
"tema"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_uloha",
|
||||||
|
"tvorba",
|
||||||
|
"uloha"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_uloha",
|
||||||
|
"tvorba",
|
||||||
|
"uloha"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_uloha",
|
||||||
|
"tvorba",
|
||||||
|
"uloha"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_uloha",
|
||||||
|
"tvorba",
|
||||||
|
"uloha"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"add_nastaveni",
|
||||||
|
"various",
|
||||||
|
"nastaveni"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"delete_nastaveni",
|
||||||
|
"various",
|
||||||
|
"nastaveni"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"change_nastaveni",
|
||||||
|
"various",
|
||||||
|
"nastaveni"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"view_nastaveni",
|
||||||
|
"various",
|
||||||
|
"nastaveni"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"model": "auth.group",
|
||||||
|
"pk": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fields": {
|
||||||
|
"name": "resitel",
|
||||||
|
"permissions": [
|
||||||
|
[
|
||||||
|
"resitel",
|
||||||
|
"auth",
|
||||||
|
"user"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"model": "auth.group",
|
||||||
|
"pk": 2
|
||||||
|
}
|
||||||
|
]
|
|
@ -73,7 +73,7 @@
|
||||||
"sort_order": 3,
|
"sort_order": 3,
|
||||||
"title": "Aktuální<br/> ročník",
|
"title": "Aktuální<br/> ročník",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_aktualni_zadani",
|
"url": "tvorba_aktualni_zadani",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
"sort_order": 5,
|
"sort_order": 5,
|
||||||
"title": "Archiv",
|
"title": "Archiv",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_archiv_rocniky",
|
"url": "tvorba_archiv_rocniky",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -289,7 +289,7 @@
|
||||||
"sort_order": 43,
|
"sort_order": 43,
|
||||||
"title": "Výsledková listina",
|
"title": "Výsledková listina",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_aktualni_vysledky",
|
"url": "tvorba_aktualni_vysledky",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -361,7 +361,7 @@
|
||||||
"sort_order": 20,
|
"sort_order": 20,
|
||||||
"title": "Proběhlo",
|
"title": "Proběhlo",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_seznam_soustredeni",
|
"url": "soustredeni_seznam",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -409,7 +409,7 @@
|
||||||
"sort_order": 23,
|
"sort_order": 23,
|
||||||
"title": "Osobní údaje",
|
"title": "Osobní údaje",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_resitel_edit",
|
"url": "personalni_resitel_edit",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -439,7 +439,7 @@
|
||||||
"sort_order": 36,
|
"sort_order": 36,
|
||||||
"title": "Nahrát řešení",
|
"title": "Nahrát řešení",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_nahraj_reseni",
|
"url": "odevzdavatko_nahraj_reseni",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -463,7 +463,7 @@
|
||||||
"sort_order": 35,
|
"sort_order": 35,
|
||||||
"title": "Témata",
|
"title": "Témata",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_archiv_temata",
|
"url": "tvorba_archiv_temata",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -589,7 +589,7 @@
|
||||||
"sort_order": 15,
|
"sort_order": 15,
|
||||||
"title": "Aktuální číslo",
|
"title": "Aktuální číslo",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_aktualni_zadani",
|
"url": "tvorba_aktualni_zadani",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -613,7 +613,7 @@
|
||||||
"sort_order": 24,
|
"sort_order": 24,
|
||||||
"title": "Čísla",
|
"title": "Čísla",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_archiv_rocniky",
|
"url": "tvorba_archiv_rocniky",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -721,7 +721,7 @@
|
||||||
"sort_order": 36,
|
"sort_order": 36,
|
||||||
"title": "Vložit řešení",
|
"title": "Vložit řešení",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_vloz_reseni",
|
"url": "odevzdavatko_vloz_reseni",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -804,7 +804,7 @@
|
||||||
"sort_order": 37,
|
"sort_order": 37,
|
||||||
"title": "Moje řešení",
|
"title": "Moje řešení",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_resitel_odevzdana_reseni",
|
"url": "odevzdavatko_resitel_odevzdana_reseni",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -828,7 +828,7 @@
|
||||||
"sort_order": 33,
|
"sort_order": 33,
|
||||||
"title": "Aktuální ročník",
|
"title": "Aktuální ročník",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_aktualni_rocnik",
|
"url": "tvorba_aktualni_rocnik",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -900,7 +900,7 @@
|
||||||
"sort_order": 46,
|
"sort_order": 46,
|
||||||
"title": "Ročník {{rocnik.rocnik}}",
|
"title": "Ročník {{rocnik.rocnik}}",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_rocnik rocnik.rocnik",
|
"url": "tvorba_rocnik rocnik.rocnik",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -924,7 +924,7 @@
|
||||||
"sort_order": 47,
|
"sort_order": 47,
|
||||||
"title": "Číslo {{ cislo.rocnik.rocnik }}.{{ cislo.poradi }}",
|
"title": "Číslo {{ cislo.rocnik.rocnik }}.{{ cislo.poradi }}",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_cislo cislo.rocnik.rocnik cislo.poradi",
|
"url": "tvorba_cislo cislo.rocnik.rocnik cislo.poradi",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -1007,7 +1007,18 @@
|
||||||
"access_guest": false,
|
"access_guest": false,
|
||||||
"access_loggedin": false,
|
"access_loggedin": false,
|
||||||
"access_perm_type": 1,
|
"access_perm_type": 1,
|
||||||
"access_permissions": [],
|
"access_permissions": [
|
||||||
|
[
|
||||||
|
"org",
|
||||||
|
"auth",
|
||||||
|
"user"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"resitel",
|
||||||
|
"auth",
|
||||||
|
"user"
|
||||||
|
]
|
||||||
|
],
|
||||||
"access_restricted": true,
|
"access_restricted": true,
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"description": "",
|
"description": "",
|
||||||
|
@ -1050,7 +1061,7 @@
|
||||||
"sort_order": 52,
|
"sort_order": 52,
|
||||||
"title": "Nahrát řešení k nadproblému {{nadproblem_id}}",
|
"title": "Nahrát řešení k nadproblému {{nadproblem_id}}",
|
||||||
"tree": 1,
|
"tree": 1,
|
||||||
"url": "seminar_nahraj_reseni nadproblem_id",
|
"url": "odevzdavatko_nahraj_reseni nadproblem_id",
|
||||||
"urlaspattern": true
|
"urlaspattern": true
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
|
@ -1079,5 +1090,29 @@
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
"pk": 53
|
"pk": 53
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fields": {
|
||||||
|
"access_guest": false,
|
||||||
|
"access_loggedin": false,
|
||||||
|
"access_perm_type": 1,
|
||||||
|
"access_permissions": [],
|
||||||
|
"access_restricted": false,
|
||||||
|
"alias": null,
|
||||||
|
"description": "",
|
||||||
|
"hidden": false,
|
||||||
|
"hint": "",
|
||||||
|
"inbreadcrumbs": true,
|
||||||
|
"inmenu": true,
|
||||||
|
"insitetree": true,
|
||||||
|
"parent": 20,
|
||||||
|
"sort_order": 54,
|
||||||
|
"title": "Export do abstraktů sousu {{ soustredeni.id }}",
|
||||||
|
"tree": 1,
|
||||||
|
"url": "soustredeni_abstrakty soustredeni.id",
|
||||||
|
"urlaspattern": true
|
||||||
|
},
|
||||||
|
"model": "sitetree.treeitem",
|
||||||
|
"pk": 54
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,652 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"codename": "org",
|
|
||||||
"ct_app_label": "auth",
|
|
||||||
"ct_model": "user"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_flatpage",
|
|
||||||
"ct_app_label": "flatpages",
|
|
||||||
"ct_model": "flatpage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_flatpage",
|
|
||||||
"ct_app_label": "flatpages",
|
|
||||||
"ct_model": "flatpage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_flatpage",
|
|
||||||
"ct_app_label": "flatpages",
|
|
||||||
"ct_model": "flatpage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_flatpage",
|
|
||||||
"ct_app_label": "flatpages",
|
|
||||||
"ct_model": "flatpage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_galerie",
|
|
||||||
"ct_app_label": "galerie",
|
|
||||||
"ct_model": "galerie"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_galerie",
|
|
||||||
"ct_app_label": "galerie",
|
|
||||||
"ct_model": "galerie"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_galerie",
|
|
||||||
"ct_app_label": "galerie",
|
|
||||||
"ct_model": "galerie"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_galerie",
|
|
||||||
"ct_app_label": "galerie",
|
|
||||||
"ct_model": "galerie"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_obrazek",
|
|
||||||
"ct_app_label": "galerie",
|
|
||||||
"ct_model": "obrazek"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_obrazek",
|
|
||||||
"ct_app_label": "galerie",
|
|
||||||
"ct_model": "obrazek"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_obrazek",
|
|
||||||
"ct_app_label": "galerie",
|
|
||||||
"ct_model": "obrazek"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_obrazek",
|
|
||||||
"ct_app_label": "galerie",
|
|
||||||
"ct_model": "obrazek"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_komentar",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "komentar"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_komentar",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "komentar"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_komentar",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "komentar"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_komentar",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "komentar"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_korekturovanepdf",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "korekturovanepdf"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_korekturovanepdf",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "korekturovanepdf"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_korekturovanepdf",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "korekturovanepdf"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_korekturovanepdf",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "korekturovanepdf"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_oprava",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "oprava"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_oprava",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "oprava"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_oprava",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "oprava"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_oprava",
|
|
||||||
"ct_app_label": "korektury",
|
|
||||||
"ct_model": "oprava"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_hlasovani",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "hlasovani"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_hlasovani",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "hlasovani"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_hlasovani",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "hlasovani"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_hlasovani",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "hlasovani"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_prednaska",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "prednaska"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_prednaska",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "prednaska"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_prednaska",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "prednaska"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_prednaska",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "prednaska"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_seznam",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "seznam"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_seznam",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "seznam"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_seznam",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "seznam"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_seznam",
|
|
||||||
"ct_app_label": "prednasky",
|
|
||||||
"ct_model": "seznam"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_cislo",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "cislo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_cislo",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "cislo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_cislo",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "cislo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_cislo",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "cislo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_clanek",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "clanek"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_clanek",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "clanek"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_clanek",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "clanek"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_clanek",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "clanek"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_konfera",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "konfera"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_konfera",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "konfera"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_konfera",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "konfera"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_konfera",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "konfera"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_konfery_ucastnici",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "konfery_ucastnici"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_konfery_ucastnici",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "konfery_ucastnici"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_konfery_ucastnici",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "konfery_ucastnici"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_konfery_ucastnici",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "konfery_ucastnici"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_nastaveni",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "nastaveni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_nastaveni",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "nastaveni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_nastaveni",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "nastaveni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_nastaveni",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "nastaveni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_novinky",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "novinky"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_novinky",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "novinky"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_novinky",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "novinky"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_novinky",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "novinky"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_organizator",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "organizator"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_organizator",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "organizator"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_organizator",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "organizator"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_organizator",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "organizator"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_osoba",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "osoba"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_osoba",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "osoba"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_osoba",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "osoba"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_osoba",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "osoba"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_pohadka",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "pohadka"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_pohadka",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "pohadka"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_pohadka",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "pohadka"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_pohadka",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "pohadka"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_prijemce",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "prijemce"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_prijemce",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "prijemce"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_prijemce",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "prijemce"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_prijemce",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "prijemce"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_problem",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "problem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_problem",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "problem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_problem",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "problem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_problem",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "problem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_resitel",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "resitel"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_resitel",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "resitel"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_resitel",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "resitel"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_resitel",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "resitel"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_rocnik",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "rocnik"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_rocnik",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "rocnik"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_rocnik",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "rocnik"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_rocnik",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "rocnik"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_skola",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "skola"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_skola",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "skola"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_skola",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "skola"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_skola",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "skola"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_soustredeni",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_soustredeni",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_soustredeni",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_soustredeni",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_soustredeni_organizatori",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni_organizatori"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_soustredeni_organizatori",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni_organizatori"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_soustredeni_organizatori",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni_organizatori"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_soustredeni_organizatori",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni_organizatori"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_soustredeni_ucastnici",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni_ucastnici"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_soustredeni_ucastnici",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni_ucastnici"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_soustredeni_ucastnici",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni_ucastnici"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_soustredeni_ucastnici",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "soustredeni_ucastnici"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_tema",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "tema"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_tema",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "tema"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_tema",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "tema"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_tema",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "tema"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_uloha",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "uloha"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_uloha",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "uloha"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_uloha",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "uloha"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_uloha",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "uloha"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_tag",
|
|
||||||
"ct_app_label": "taggit",
|
|
||||||
"ct_model": "tag"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_tag",
|
|
||||||
"ct_app_label": "taggit",
|
|
||||||
"ct_model": "tag"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_tag",
|
|
||||||
"ct_app_label": "taggit",
|
|
||||||
"ct_model": "tag"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_tag",
|
|
||||||
"ct_app_label": "taggit",
|
|
||||||
"ct_model": "tag"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_taggeditem",
|
|
||||||
"ct_app_label": "taggit",
|
|
||||||
"ct_model": "taggeditem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_taggeditem",
|
|
||||||
"ct_app_label": "taggit",
|
|
||||||
"ct_model": "taggeditem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "delete_taggeditem",
|
|
||||||
"ct_app_label": "taggit",
|
|
||||||
"ct_model": "taggeditem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_taggeditem",
|
|
||||||
"ct_app_label": "taggit",
|
|
||||||
"ct_model": "taggeditem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_fotkaheader",
|
|
||||||
"ct_app_label": "header_fotky",
|
|
||||||
"ct_model": "fotkaheader"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_fotkaheader",
|
|
||||||
"ct_app_label": "header_fotky",
|
|
||||||
"ct_model": "fotkaheader"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_fotkaheader",
|
|
||||||
"ct_app_label": "header_fotky",
|
|
||||||
"ct_model": "fotkaheader"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_fotkaurlvazba",
|
|
||||||
"ct_app_label": "header_fotky",
|
|
||||||
"ct_model": "fotkaurlvazba"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_fotkaurlvazba",
|
|
||||||
"ct_app_label": "header_fotky",
|
|
||||||
"ct_model": "fotkaurlvazba"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_fotkaurlvazba",
|
|
||||||
"ct_app_label": "header_fotky",
|
|
||||||
"ct_model": "fotkaurlvazba"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "add_deadline",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "deadline"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "change_deadline",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "deadline"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codename": "view_deadline",
|
|
||||||
"ct_app_label": "seminar",
|
|
||||||
"ct_model": "deadline"
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -13,7 +13,6 @@ make install_venv
|
||||||
make install
|
make install
|
||||||
deploy_v2/pre_migration.py
|
deploy_v2/pre_migration.py
|
||||||
make deploy_test
|
make deploy_test
|
||||||
./manage.py load_org_permissions admin_org_prava.json
|
|
||||||
./manage.py loaddata data/*
|
./manage.py loaddata data/*
|
||||||
systemctl --user start mamweb-test.service
|
systemctl --user start mamweb-test.service
|
||||||
./manage.py generate_thumbnails
|
./manage.py generate_thumbnails
|
||||||
|
|
27
docs/css.rst
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
CSS (a další styly na webu)
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Inspirován `css-trick článkem <https://css-tricks.com/methods-organize-css/>`_ jsem se rozhodl rozdělit
|
||||||
|
CSSka do
|
||||||
|
|
||||||
|
- Konstant (``constants.css``), které jsou využívány na mnoha místech CSSek
|
||||||
|
- Nastylování html tagů (``base.css``)
|
||||||
|
- Layoutu (``layout.css``), což je to, co určuje celkové rozložení stránky
|
||||||
|
- Jednotlivých prvků (``modules.css``)
|
||||||
|
|
||||||
|
Dále jsem separoval CSSka pro **galerii** (potřebuje hodně specifických stylů). Stejně tak **korekturovátko** má styly separátně.
|
||||||
|
|
||||||
|
Dále web (asi) používá externí frameworky (v separátních složkách – mají k sobě i JS a podobné věci):
|
||||||
|
|
||||||
|
- bootstrap: dělá nějaké basic stylování, *web je na něm hodně závislý* (například jsem zjistil, že bootstrap kdysi přidával ``font-size:14px``, bez čehož se web úplně rozpadnul) (také na něm běží mobilní meníčko, které navíc vyžaduje Popper, tedy bootstrap.bundle.js místo bootstrap.js)
|
||||||
|
|
||||||
|
Pak jsou tu ``mamweb-dev.css`` a ``printtable.css``, co jsem si ještě nerozmyslel, co s tím.
|
||||||
|
|
||||||
|
Pár myšlenek
|
||||||
|
------------
|
||||||
|
|
||||||
|
- Až na pár výjimek (galerii a korekturovátko) bych styly držel v jedné složce a málo souborech,
|
||||||
|
protože CSS šíleně dědí všechno možné
|
||||||
|
- Chce to dobře pojmenovávat třídy (speciálně aby bylo vidět, co ta třída dělá nebo kde se používá)
|
||||||
|
- Chce to hodně komentovat kód (speciálně tam, kde není splněn předchozí bod)
|
||||||
|
|
|
@ -9,12 +9,6 @@ static
|
||||||
------
|
------
|
||||||
Složka, kam django nakopíruje všechno ze složek static a pak na to z templatů / kódu jde ukazovat pomocí ``static``.
|
Složka, kam django nakopíruje všechno ze složek static a pak na to z templatů / kódu jde ukazovat pomocí ``static``.
|
||||||
|
|
||||||
_git_hooks
|
|
||||||
----------
|
|
||||||
Hooky do gitu pro kontrolu Pythoního stylu. Především ``flake8``.
|
|
||||||
|
|
||||||
Zbylo tu z minulosti mamwebu.
|
|
||||||
|
|
||||||
data
|
data
|
||||||
----
|
----
|
||||||
Obsahuje data, která patří do databáze, ale jsou přímo součástí webu jako
|
Obsahuje data, která patří do databáze, ale jsou přímo součástí webu jako
|
||||||
|
|
|
@ -27,8 +27,10 @@ Dokumentace (jak v ``docs/``, tak přímo v kódu) je psaná ve
|
||||||
:titlesonly:
|
:titlesonly:
|
||||||
|
|
||||||
vyvoj
|
vyvoj
|
||||||
|
zavislosti
|
||||||
sphinx
|
sphinx
|
||||||
skripty
|
skripty
|
||||||
|
zkratky
|
||||||
modules/modules
|
modules/modules
|
||||||
dalsi_soubory
|
dalsi_soubory
|
||||||
zapisy/zapisy
|
zapisy/zapisy
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
FIXME přepsat do rst, přidat i další věci a případně přesunout na wiki
|
||||||
Přidání obrázků do odměn:
|
Přidání obrázků do odměn:
|
||||||
admin -> flatpage odměn -> ikona přidat obrázek
|
admin -> flatpage odměn -> ikona přidat obrázek
|
||||||
záložka odeslat, vybrat obrázek, odeslat
|
záložka odeslat, vybrat obrázek, odeslat
|
|
@ -1,13 +1,15 @@
|
||||||
Sphinx na našem webu
|
Sphinx na našem webu
|
||||||
====================
|
====================
|
||||||
|
|
||||||
Dokumentace se zkompiluje příkazem ``make html`` ve složce ``doc``.
|
Dokumentace se zkompiluje příkazem ``make html`` ve složce ``docs``. (Musíte mít zapnutý virtualenv)
|
||||||
|
|
||||||
Složka ``modules`` je automaticiky generována a přegenerovávána. (**Nic v ní neupravovat!**)
|
Složka ``modules`` je automaticiky generována a přegenerovávána. (**Nic v ní neupravovat!**)
|
||||||
Jinak všechny rst, co jsou ve složce ``doc`` a jejích podsložkách nezačínajících podtržítkem, budou v dokumentaci a to je přesně to, co editovat pro změnu dokumentace (kromě dokumentace přímo v Pythonu).
|
Jinak všechny rst, co jsou ve složce ``docs`` a jejích podsložkách nezačínajících podtržítkem, budou v dokumentaci a to je přesně to, co editovat pro změnu dokumentace (kromě dokumentace přímo v Pythonu).
|
||||||
|
|
||||||
Sphinx se píše v rst: `Návod na syntaxi rst`_ `Cheat sheet`_
|
Sphinx se píše v rst: `Návod na syntaxi rst`_ `Cheat sheet`_
|
||||||
|
|
||||||
|
Pokud něco chcete protlačit do bočního meníčka, je potřeba to připsat do souboru ``docs/index.rst`` (Zatím není úplně konsensus nad tím, co tam má a nemá být, takže pokud si nejste jistí, cpěte tam *všechno* ☺)
|
||||||
|
|
||||||
To je snad vše, co je potřeba vědět k dokumentaci mamwebu. Následující sekce jsou o tom, co jsem provedl Sphinxu, aby to fungovalo:
|
To je snad vše, co je potřeba vědět k dokumentaci mamwebu. Následující sekce jsou o tom, co jsem provedl Sphinxu, aby to fungovalo:
|
||||||
|
|
||||||
.. _Návod na syntaxi rst: https://sphinx-tutorial.readthedocs.io/step-1/#sections
|
.. _Návod na syntaxi rst: https://sphinx-tutorial.readthedocs.io/step-1/#sections
|
||||||
|
|
|
@ -10,11 +10,9 @@ věci jako chybové hlášky a vzhled M&M stránek (menu, patička, atd.). Aktu
|
||||||
i veškeré csv.
|
i veškeré csv.
|
||||||
|
|
||||||
Další jsou pak jednotlivé aplikace (pokud něco hledáte, tak zřejmě chcete najít
|
Další jsou pak jednotlivé aplikace (pokud něco hledáte, tak zřejmě chcete najít
|
||||||
tu aplikaci, která tomu odpovídá, respektive se k ní dostat přes url), za
|
tu aplikaci, která tomu odpovídá, respektive se k ní dostat přes url).
|
||||||
zmínku stojí seminar, kde jsou takové ty věci, co zbyly. Plus jsou tam aktuálně
|
|
||||||
téměř všechny modely, protože je těžké je přesunout jinam.
|
|
||||||
|
|
||||||
**TLDR: Nevšímejte si složky data/ a souborů přímo v kořenové složce.**
|
**TLDR: Nevšímejte si složek data/ seminar/ a souborů přímo v kořenové složce.**
|
||||||
Kromě věcí potřebných ke gitu, :doc:`ke spuštění <vyvoj>` a fukci djanga,
|
Kromě věcí potřebných ke gitu, :doc:`ke spuštění <vyvoj>` a fukci djanga,
|
||||||
dalších drobností, lokální databáze a již zmíněných aplikací jsou tu ``data``,
|
dalších drobností, lokální databáze a již zmíněných aplikací jsou tu ``data``,
|
||||||
kde je takový ten obsah webu, co by se měl dát snadno měnit (tudíž musí být v
|
kde je takový ten obsah webu, co by se měl dát snadno měnit (tudíž musí být v
|
||||||
|
@ -22,6 +20,9 @@ databázi), tj. statické stránky, menu a obrázky v pozadí menu. Ten je třeb
|
||||||
měnit hlavně na produkci a sekundárně tady (může to dělat i newebař a nechcete
|
měnit hlavně na produkci a sekundárně tady (může to dělat i newebař a nechcete
|
||||||
přepsat jeho práci). Vše, co nejsou aplikace je popsáno :doc:`tady <dalsi_soubory>`.
|
přepsat jeho práci). Vše, co nejsou aplikace je popsáno :doc:`tady <dalsi_soubory>`.
|
||||||
|
|
||||||
|
Ještě je tu aplikace ``seminar/``, kde bylo původně skoro všechno, a tak nám
|
||||||
|
tam zbývá spoustu historických migrací (čehož se jen tak nezbavíme).
|
||||||
|
|
||||||
Základy djanga
|
Základy djanga
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
.. Není odkázaná z menu, je to záměr
|
|
||||||
|
|
||||||
Tabulka prerekvizit v různých distribucích
|
|
||||||
=========
|
|
||||||
|
|
||||||
.. admonition:: Metodika
|
|
||||||
|
|
||||||
Na čistém repozitáři (``git clean -fxd``) a čistém systému spouštíme
|
|
||||||
``make/init_local``. Když to spadne, tak do tabulky zapíšeme, co jsme
|
|
||||||
přiinstalovali. Protože větev ``makefiles`` aktuálně není mergenutá do
|
|
||||||
masteru, nefunguje synchronizace flatpages (a stejně nemáme SSH klíč), takže
|
|
||||||
tam ``make/init_local`` sestřelíme a vyzkoušíme, že ``make/test`` spustí
|
|
||||||
testy.
|
|
||||||
|
|
||||||
.. Grafické tabulky (grid-tables, simple-tables) jsou strašný porod vyrábět, dlabu na to a cpu to do CSV…
|
|
||||||
|
|
||||||
.. csv-table:: Prerekvizity v jednotlivých distribucích
|
|
||||||
:header: Distribuce / OS, Repozitář s Py3.9, venv, py knihovny, PostgreSQL knihovna, poznámky
|
|
||||||
|
|
||||||
Ubuntu 22.10, ??, ``python3-venv``, ``python3-dev``, ``libpq-dev``, "Je potřeba zapnout zdroj ``universe`` a nainstalovat kompilátor C (``gcc``)?"
|
|
||||||
Linux Mint 21, ??, ``python3-venv``, ``python3-dev``, ``libpq-dev``, ""
|
|
||||||
Archlinux 2022.11.01, AUR, vestavěný, vestavěné, ``postgresql-libs``, "Je potřeba céčkový kompilátor (``gcc``)"
|
|
||||||
openSUSE Leap 15.4, oficiální (``python39``), předinstalovaný?, ``python39-devel``, ??FIXME!!, "Výchozí verze pythonu je 3.6 a ta je moc stará, potřeba instalovat ``gcc``. Nevím jak sehnat pg_config."
|
|
||||||
Debian 11, "oficiální, výchozí", ??, ??, ??, "Určitě to tam rozběhat jde, protože Gimli. Nejspíš bude relativně podobné Ubuntu."
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ Kromě toho je potřeba mít účet na `Gitee <https://gitea.ks.matfyz.cz>`_, kd
|
||||||
bydlí gitový repozitář s kódem.
|
bydlí gitový repozitář s kódem.
|
||||||
|
|
||||||
.. tip:: Potřebné balíčky v různých distribucích jsou sepsané v :ref:`tabulce
|
.. tip:: Potřebné balíčky v různých distribucích jsou sepsané v :ref:`tabulce
|
||||||
prerekvizit <Tabulka prerekvizit v různých distribucích>`.
|
prerekvizit <Alternativní jména balíčků>`.
|
||||||
|
|
||||||
Doporučené
|
Doporučené
|
||||||
^^^^^^^^^^
|
^^^^^^^^^^
|
||||||
|
|
|
@ -116,7 +116,7 @@ Aktuálně: Jakýsi coding style zhruba existuje, není popsaný, šíří se li
|
||||||
- Nesmí být striktně vynucovaný
|
- Nesmí být striktně vynucovaný
|
||||||
- Musel by být hodně nastavitelný
|
- Musel by být hodně nastavitelný
|
||||||
- Nechceme mít kód plný `#NOQA: WTF42`
|
- Nechceme mít kód plný `#NOQA: WTF42`
|
||||||
- Nejspíš vždycky bude mít false positives (`seminar.utils.roman_numerals`) i false negatives (`seminar.models.tvorba.Cislo.posli_cislo_mailem`)
|
- Nejspíš vždycky bude mít false positives (`tvorba.utils.roman_numerals`) i false negatives (`tvorba.models.Cislo.posli_cislo_mailem`)
|
||||||
- Možná dobrý sluha, ale určitě špatný pán (also: špatná zkušenost ☺)
|
- Možná dobrý sluha, ale určitě špatný pán (also: špatná zkušenost ☺)
|
||||||
- __Důsledek:__ Hrozí, že těch falešných varování bude moc, čímž to ztratí smysl úplně
|
- __Důsledek:__ Hrozí, že těch falešných varování bude moc, čímž to ztratí smysl úplně
|
||||||
- Potenciálně by šlo aplikovat jen lokálně na změny?
|
- Potenciálně by šlo aplikovat jen lokálně na změny?
|
||||||
|
|
97
docs/zavislosti.rst
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
Závislosti webu
|
||||||
|
@@@@@@@@@@@@@@@
|
||||||
|
|
||||||
|
Web ke svému běhu potřebuje různé další programy. Tahle stránka se snaží je pokrýt.
|
||||||
|
|
||||||
|
Stránka je koncipována jako odrážkový seznam balíčků pro Ubuntu s případnými
|
||||||
|
komentáři, na konci stránky jsou uvedena :ref:`jména balíčků <Alternativní jména
|
||||||
|
balíčků>` v různých dalších distribucích. (Seznam mj. cílí na lokální
|
||||||
|
rozchození, proto popisuji Ubuntu a ne Debian. I tak se ale snažíme popsat web
|
||||||
|
v úplnosti.)
|
||||||
|
|
||||||
|
.. I use Arch, btw.
|
||||||
|
|
||||||
|
|
||||||
|
Základ webu
|
||||||
|
===========
|
||||||
|
|
||||||
|
- ``python3`` – Ideálně Python 3.9, jenž je na Gimlim
|
||||||
|
- ``python3-pip`` pro instalaci dalších Pythoních balíčků podle ``requirements.txt``
|
||||||
|
- ``python3-venv``
|
||||||
|
- ``gcc`` – kompilace Pythoních knihoven ze zdrojových distribucí (sdist), možná (neotestováno) jde jako alternativu použít ``python3-wheel`` a stahovat bdists
|
||||||
|
- ``python3-dev`` – taktéž
|
||||||
|
- ``libpq-dev`` do třetice…
|
||||||
|
- ``ghostscript`` TODO konverze PDF v korekturovátku
|
||||||
|
- ``pdflatex`` FIXME! generování obálek a stvrzenek
|
||||||
|
- ``git`` – používán :ref:`Make skripty`
|
||||||
|
- ``locales`` pro české formáty
|
||||||
|
|
||||||
|
Nasazení na produkci / testweb
|
||||||
|
==============================
|
||||||
|
|
||||||
|
(nejsou nutně potřeba k provozu lokální instance)
|
||||||
|
|
||||||
|
- ``rsync``
|
||||||
|
- ``pg_utils`` FIXME
|
||||||
|
- ``htpasswd`` FIXME – aby testweb nepoužívali náhodní kolemjdoucí
|
||||||
|
- ``postgresql-server`` TODO
|
||||||
|
- ``acl`` pro nastavování práv přes ``setfacl``
|
||||||
|
|
||||||
|
Pro testweb je potřeba i všechno pro :ref:`dokumentaci <Dokumentace>`, vizte níž.
|
||||||
|
|
||||||
|
Předpokládá se nasazení v uWSGI pod Nginxem a služba běžící pod systemd, nicméně to už je spíš záležitost infrastruktury a ne specifikum mamwebu.
|
||||||
|
|
||||||
|
Dokumentace
|
||||||
|
===========
|
||||||
|
|
||||||
|
- ``make`` pro zbuildění
|
||||||
|
- Pythoní balíčky podle příslušné části ``requirements.txt``
|
||||||
|
|
||||||
|
Vývojové nástroje
|
||||||
|
=================
|
||||||
|
|
||||||
|
(Nejsou nezbytně nutné, ale předpokládáme jejich užitečnost. Mohou se hodit i na produkci.)
|
||||||
|
|
||||||
|
- ``psql`` TODO pro manuální dotazy do PostgreSQL
|
||||||
|
- ``sqlite3`` TODO totéž pro SQLite3
|
||||||
|
- ``ssh``
|
||||||
|
- ``graphviz`` pro vygenerování schématu
|
||||||
|
- ``rsync``
|
||||||
|
- ``ipython3`` – hezčí interaktivní shell (stačí z ``requirements.txt``)
|
||||||
|
|
||||||
|
Potenciální usnadnění života
|
||||||
|
============================
|
||||||
|
|
||||||
|
(Úplně zbytečné, ale sdílíme pozitivní zkušenosti :-))
|
||||||
|
|
||||||
|
- ``tea`` – CLI klient pro Giteu, aby člověk nepotřeboval otevírat web pro založení PR
|
||||||
|
|
||||||
|
|
||||||
|
Alternativní jména balíčků
|
||||||
|
==========================
|
||||||
|
|
||||||
|
Různé distribuce balí SW různě, takže to, co je v jedné distribuci jeden
|
||||||
|
balíček může být v jiné rozděleno do víc. Pro usnadnění nasazení je tady
|
||||||
|
přehled známých alternativních jmen.
|
||||||
|
|
||||||
|
TODO: tabulka není úplná. Pokud na něco narazíte, tak ji prosím doplňte.
|
||||||
|
|
||||||
|
.. admonition:: Jak se pozná, že web funguje, pro účely tabulky?
|
||||||
|
|
||||||
|
Na čistém repozitáři (``git clean -fxd``) a čistém systému spouštíme
|
||||||
|
``make/init_local``. Když to spadne, tak do tabulky zapíšeme, co jsme
|
||||||
|
přiinstalovali. Protože nefunguje synchronizace flatpages (nemáme SSH klíč),
|
||||||
|
``make/init_local`` sestřelíme při pokusu o synchronizaci a vyzkoušíme, že
|
||||||
|
``make/test`` spustí testy.
|
||||||
|
|
||||||
|
.. Grafické tabulky (grid-tables, simple-tables) jsou strašný porod vyrábět, dlabu na to a cpu to do CSV…
|
||||||
|
|
||||||
|
.. csv-table:: Prerekvizity v jednotlivých distribucích
|
||||||
|
:header: Distribuce / OS, Repozitář s Py3.9, venv, py knihovny, PostgreSQL knihovna, poznámky
|
||||||
|
|
||||||
|
Ubuntu 22.10, ??, ``python3-venv``, ``python3-dev``, ``libpq-dev``, "Je potřeba zapnout zdroj ``universe`` a nainstalovat kompilátor C (``gcc``)?"
|
||||||
|
Linux Mint 21, ??, ``python3-venv``, ``python3-dev``, ``libpq-dev``, ""
|
||||||
|
Archlinux 2022.11.01, AUR, vestavěný, vestavěné, ``postgresql-libs``, "Je potřeba céčkový kompilátor (``gcc``)"
|
||||||
|
openSUSE Leap 15.4, oficiální (``python39``), předinstalovaný?, ``python39-devel``, ??FIXME!!, "Výchozí verze pythonu je 3.6 a ta je moc stará, potřeba instalovat ``gcc``. Nevím jak sehnat pg_config."
|
||||||
|
Debian 11, "oficiální, výchozí", ??, ??, ??, "Určitě to tam rozběhat jde, protože Gimli. Nejspíš bude relativně podobné Ubuntu."
|
||||||
|
|
86
docs/zkratky.rst
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
Zkratky aplikací ve zdrojácích
|
||||||
|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
|
||||||
|
Ve zdrojácích (zejména různé ``models.py``, ``views.py`` ap.) používáme spoustu
|
||||||
|
modelů. Někdy je praktičtější / někdo preferuje importovat celou aplikaci jako
|
||||||
|
jedno jméno a používat modely bez explicitních importů, tj::
|
||||||
|
|
||||||
|
# „hromadné“ importy:
|
||||||
|
import personalni.models as p
|
||||||
|
...
|
||||||
|
p.Organizator.objects.all()
|
||||||
|
|
||||||
|
# „explicitní“ importy:
|
||||||
|
from personalni.models import Organizator
|
||||||
|
...
|
||||||
|
Organizator.objects.all()
|
||||||
|
|
||||||
|
Na webschůzce 2024-11-05 jsme na toto téma otevřeli diskusi, tady je její závěr.
|
||||||
|
|
||||||
|
.. admonition:: Historické okénko
|
||||||
|
:class: note
|
||||||
|
|
||||||
|
Kdysi jsme měli (prakticky) všechny modely v jedné aplikaci, ``seminar``. Na
|
||||||
|
různých místech se pak ``seminar.models`` importovalo typicky jako ``s``
|
||||||
|
nebo jako ``m``.
|
||||||
|
|
||||||
|
Přirozeně, toto už nejde tak snadno, protože už neexistuje jedno místo, ze
|
||||||
|
kterého chceme tahat modely v kódu.
|
||||||
|
|
||||||
|
Konvence
|
||||||
|
========
|
||||||
|
|
||||||
|
Shodli jsme se, že nám rozhodně nevadí explicitní importy a z pohledu
|
||||||
|
čitelnosti je preferujeme. Nicméně při psaní kódu to některým webařům přijde
|
||||||
|
nepohodlné, takže očekáváme, že bude existovat spousta kódu, která bude chtít
|
||||||
|
importovat hromadně. Usnesli jsme se proto na následujících kanonických
|
||||||
|
zkratkách, aby se aplikace alespoň zkracovaly konzistentně.
|
||||||
|
|
||||||
|
V závorkách je uvedené případné jméno, ale nepředpokládáme, že někdo bude danou
|
||||||
|
aplikaci chtít importovat hromadně. Některé aplikace zkratku nemají, ty se
|
||||||
|
importují vždy pod plným jménem nebo explicitně.
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Model
|
||||||
|
- Zkratka
|
||||||
|
* - ``aesop``
|
||||||
|
- ---
|
||||||
|
* - ``api``
|
||||||
|
- --- (``api``)
|
||||||
|
* - ``galerie``
|
||||||
|
- ``g``
|
||||||
|
* - ``header_fotky``
|
||||||
|
- --- (``hdr``)
|
||||||
|
* - ``korektury``
|
||||||
|
- ``kor``
|
||||||
|
* - ``novinky``
|
||||||
|
- ``nov``
|
||||||
|
* - ``odevzdavatko``
|
||||||
|
- ``odev``
|
||||||
|
* - ``personální``
|
||||||
|
- ``pers``/``p``
|
||||||
|
* - ``sifrovacka``
|
||||||
|
- (``sifr``)
|
||||||
|
* - ``soustredeni``
|
||||||
|
- ``sou``
|
||||||
|
* - ``treenode``
|
||||||
|
- ``tn``
|
||||||
|
* - ``tvorba``
|
||||||
|
- ``tv``
|
||||||
|
* - ``various``
|
||||||
|
- ``v``/``var``
|
||||||
|
* - ``vyroci``
|
||||||
|
- ---
|
||||||
|
* - ``vysledkovky``
|
||||||
|
- ``vysl``
|
||||||
|
|
||||||
|
|
||||||
|
.. admonition:: O všech modelech pod jedním jménem
|
||||||
|
:class: warning
|
||||||
|
|
||||||
|
Historické okénko výš zatajuje jeden detail: Při práci v shellu se hodí mít
|
||||||
|
modely k dispozici a nemuset přemýšlet nad dělením do aplikací, takže ve
|
||||||
|
skutečnosti existuje ``mamweb.vsechno``, jenž všechny modely obsahuje.
|
||||||
|
Z čitelnostních důvodů je ale *zakázáno* tento modul používat v kódu.
|
25
galerie/TODO
|
@ -1,25 +0,0 @@
|
||||||
========
|
|
||||||
| TODO |
|
|
||||||
|======|
|
|
||||||
|
|
||||||
Aktualni
|
|
||||||
* co s titulni fotkou
|
|
||||||
* do CSS
|
|
||||||
* nahledy
|
|
||||||
* nastylovat tabulku s nahledy
|
|
||||||
* komentare uz na nahledy?
|
|
||||||
* detail
|
|
||||||
* nahledy pred a po
|
|
||||||
* opravit prechodove sipky
|
|
||||||
* vyrobit prechodove sipky ve M&M-stylu
|
|
||||||
|
|
||||||
Dlouhodobe
|
|
||||||
* sipky na prechazeni mezi fotkami
|
|
||||||
* hromadne PRIDANI fotek do jiz existujici galerie
|
|
||||||
|
|
||||||
Fylozoficke
|
|
||||||
* zvolit velikosti velke a male fotky
|
|
||||||
* je potreba i jine razeni nez automaticky podle casu nebo staci podgalerie?
|
|
||||||
* napr. dve hry na dvou ruznych mistech ve stejny cas
|
|
||||||
* fotky od ucastniku ze hry (skupinky se pohybuji ve stejny cas, ale maji sled fotek) -- nestaci to pripadne vrazit do podgalerii?
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#coding: utf-8
|
|
||||||
|
|
||||||
from galerie.models import Obrazek, Galerie
|
from galerie.models import Obrazek, Galerie
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from autocomplete_light import shortcuts as autocomplete_light
|
|
||||||
|
|
||||||
from .models import Obrazek, Galerie
|
|
||||||
from .views import cesta_od_korene
|
|
||||||
|
|
||||||
|
|
||||||
class ObrazekAutocomplete(autocomplete_light.AutocompleteModelBase):
|
|
||||||
|
|
||||||
model = Obrazek
|
|
||||||
search_fields = ['nazev', 'popis']
|
|
||||||
split_words = True
|
|
||||||
limit_choices = 15
|
|
||||||
attrs = {
|
|
||||||
# This will set the input placeholder attribute:
|
|
||||||
'placeholder': u'Obrázek',
|
|
||||||
# This will set the yourlabs.Autocomplete.minimumCharacters
|
|
||||||
# options, the naming conversion is handled by jQuery
|
|
||||||
'data-autocomplete-minimum-characters': 1,
|
|
||||||
}
|
|
||||||
|
|
||||||
choice_html_format = '''
|
|
||||||
<span class="block" data-value="{}">
|
|
||||||
<span class="block">
|
|
||||||
{}
|
|
||||||
<span class="block">{}</span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
'''
|
|
||||||
|
|
||||||
def choice_label(self, obrazek):
|
|
||||||
cesta = "/".join(g.nazev for g in cesta_od_korene(obrazek.galerie))
|
|
||||||
popis = "{}<br>".format(obrazek.popis) if obrazek.popis else ""
|
|
||||||
return '{}<br>{}{}'.format(obrazek.nazev, popis, cesta)
|
|
||||||
|
|
||||||
def choice_html(self, obrazek):
|
|
||||||
"""Vrátí kus html i s obrázkem, které se pak ukazuje v nabídce"""
|
|
||||||
return self.choice_html_format.format(self.choice_value(obrazek),
|
|
||||||
obrazek.obrazek_maly_tag(), self.choice_label(obrazek))
|
|
||||||
|
|
||||||
widget_attrs={
|
|
||||||
'data-widget-maximum-values': 15,
|
|
||||||
'class': 'modern-style',
|
|
||||||
}
|
|
||||||
|
|
||||||
autocomplete_light.register(ObrazekAutocomplete)
|
|
|
@ -1,7 +1,4 @@
|
||||||
#coding: utf-8
|
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from seminar.models import Soustredeni
|
|
||||||
|
|
||||||
class KomentarForm(forms.Form):
|
class KomentarForm(forms.Form):
|
||||||
komentar = forms.CharField(label = "Komentář:", max_length = 300, required=False)
|
komentar = forms.CharField(label = "Komentář:", max_length = 300, required=False)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Generated by Django 1.11.20 on 2019-04-30 21:40
|
# Generated by Django 1.11.20 on 2019-04-30 21:40
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Generated by Django 1.11.21 on 2019-06-10 21:58
|
# Generated by Django 1.11.21 on 2019-06-10 21:58
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
13
galerie/migrations/0011_pre_split_soustredeni.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Generated by Django 4.2.11 on 2024-04-30 21:53
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('galerie', '0010_auto_20200819_0947'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
20
galerie/migrations/0012_soustredeni_relink.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Generated by Django 4.2.11 on 2024-05-01 13:07
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('soustredeni', '0001_split_from_seminar'),
|
||||||
|
('galerie', '0011_pre_split_soustredeni'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='galerie',
|
||||||
|
name='soustredeni',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='soustredeni.soustredeni'),
|
||||||
|
),
|
||||||
|
]
|
14
galerie/migrations/0013_post_split_soustredeni.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Generated by Django 4.2.11 on 2024-05-01 13:35
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('galerie', '0012_soustredeni_relink'),
|
||||||
|
('soustredeni', '0003_post_split_soustredeni'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
|
@ -1,14 +1,11 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
#from django.db.models import Q
|
#from django.db.models import Q
|
||||||
from django.utils.encoding import force_text
|
|
||||||
from imagekit.models import ImageSpecField
|
from imagekit.models import ImageSpecField
|
||||||
from imagekit.processors import ResizeToFit, Transpose
|
from imagekit.processors import ResizeToFit, Transpose
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from seminar.models import Soustredeni
|
from soustredeni.models import Soustredeni
|
||||||
|
|
||||||
VZDY=0
|
VZDY=0
|
||||||
ORG=1
|
ORG=1
|
||||||
|
|
186
galerie/static/css/galerie.css
Normal file
|
@ -0,0 +1,186 @@
|
||||||
|
@charset "utf-8"; /* vynuť utf-8 */
|
||||||
|
|
||||||
|
/* Galerie */
|
||||||
|
|
||||||
|
|
||||||
|
/* velká fotka */
|
||||||
|
/* zmenšování spolu s oknem prohlížeče */
|
||||||
|
.galerie .obrazek, .titulni_obrazek {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
width: auto\9; /* ie8 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.predchozi_obrazek{
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
width: 33%;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.predchozi_obrazek:hover{
|
||||||
|
background-image: url("/static/galerie/prvky/predchozi.svg");
|
||||||
|
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
|
||||||
|
background-position: left center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
.dalsi_obrazek{
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
width: 33%;
|
||||||
|
height: 100%;
|
||||||
|
left: 67%;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.dalsi_obrazek:hover{
|
||||||
|
background-image: url("/static/galerie/prvky/dalsi.svg");
|
||||||
|
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
|
||||||
|
background-position: right center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie {
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
margin: 20px auto 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie h1 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie_hlavicka {
|
||||||
|
margin: 30px auto 30px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popis {
|
||||||
|
margin: 10px 10px 30px 0px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#nahoru {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* titulní obrázek hlavní galerie soustředění */
|
||||||
|
|
||||||
|
.galerie_nahledy{
|
||||||
|
/*margin: 1em 0;*/
|
||||||
|
margin: auto;
|
||||||
|
padding: 10px;
|
||||||
|
text-align: center;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie_nahledy img {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie_nahledy div.navigace {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie_nahled, .podgalerie_nahled { /* frame */
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
float: left;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
text-align: center;
|
||||||
|
border: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border-color: var(--svetla-oranzova);
|
||||||
|
background-color: var(--barva-pozadi);
|
||||||
|
white-space: nowrap;
|
||||||
|
margin: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie_nahled:hover, .podgalerie_nahled:hover {
|
||||||
|
background-color: var(--svetla-oranzova);
|
||||||
|
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
|
||||||
|
color: var(--tmava-oranzova);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vystredeno{ /* helper */
|
||||||
|
display: inline-block;
|
||||||
|
height: 100%;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie_nahled img {
|
||||||
|
vertical-align: middle;
|
||||||
|
max-height: 180px;
|
||||||
|
max-width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie_nahled div {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0px;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.podgalerie_nahled img {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
max-height: 125px;
|
||||||
|
max-width: 167px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.podgalerie_nahled .nazev_galerie {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
top: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Odkazy na předchozí a následující podgalerii */
|
||||||
|
.galerie_predchozi_nasledujici {
|
||||||
|
overflow: auto;
|
||||||
|
margin: 10px auto 10px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie_predchozi_nasledujici .predchozi {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galerie_predchozi_nasledujici .nasledujici {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* posune kotvu obrázku v galerii o oranžový pruh dolu, aby se pod ním obrázek neschovával */
|
||||||
|
/* https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header */
|
||||||
|
.kotva_obrazku {
|
||||||
|
position: absolute;
|
||||||
|
width: 0;
|
||||||
|
height: 55px; /* viz #title */
|
||||||
|
margin-top: -55px; /* viz #title */
|
||||||
|
}
|
||||||
|
@media(max-width: 860px) {
|
||||||
|
.kotva_obrazku {
|
||||||
|
height: 3em; /* #FIXME nemám páru, jak zjistit výšku toho elementu */
|
||||||
|
margin-top: -3em; /* #FIXME */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* plus a minus tlacitka */
|
||||||
|
.mam-org-only-galerie {
|
||||||
|
background: var(--orgovska-svetla-fialova);
|
||||||
|
padding: 10px;
|
||||||
|
margin: 10px 10px 10px -20px;
|
||||||
|
border: #333 2px dashed;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mam-org-only-galerie a{
|
||||||
|
padding: 3px 5px;
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background-color: var(--tmava-oranzova);;
|
||||||
|
color: var(--barva-pozadi);
|
||||||
|
float: left;
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.html" %}
|
{% extends "galerie/base.html" %}
|
||||||
|
|
||||||
|
|
||||||
{% block nadpis1a %}
|
{% block nadpis1a %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.html" %}
|
{% extends "galerie/base.html" %}
|
||||||
|
|
||||||
{% block nadpis1a %}
|
{% block nadpis1a %}
|
||||||
Galerie {{galerie.nazev}}
|
Galerie {{galerie.nazev}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "base.html" %}
|
{% extends "galerie/base.html" %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
6
galerie/templates/galerie/base.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block custom_css %}
|
||||||
|
<link href="{% static 'css/galerie.css' %}?version=1" rel="stylesheet">
|
||||||
|
{% endblock %}
|
|
@ -1,14 +1,5 @@
|
||||||
"""
|
|
||||||
Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují:
|
|
||||||
|
|
||||||
- ``<int:pk>/`` :func:`~galerie.views.nahled`
|
|
||||||
- ``<int:pk>/<int:fotka>/`` :func:`~galerie.views.detail`
|
|
||||||
- ``<int:galerie>/new/`` :func:`~galerie.views.new_galerie`
|
|
||||||
- ``<int:galerie>/plus/<int:subgalerie>/`` :func:`~galerie.views.plus_galerie`
|
|
||||||
- ``<int:galerie>/minus/<int:subgalerie>/`` :func:`~galerie.views.minus_galerie`
|
|
||||||
"""
|
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
from seminar.utils import org_required
|
from personalni.utils import org_required
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from django.http import HttpResponse, Http404
|
from django.http import HttpResponse, Http404
|
||||||
|
@ -8,7 +6,7 @@ from django.template import RequestContext
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from galerie.models import Obrazek, Galerie
|
from galerie.models import Obrazek, Galerie
|
||||||
from seminar.models import Soustredeni
|
from soustredeni.models import Soustredeni
|
||||||
from galerie.forms import KomentarForm, NewGalerieForm
|
from galerie.forms import KomentarForm, NewGalerieForm
|
||||||
|
|
||||||
def zobrazit(galerie, request):
|
def zobrazit(galerie, request):
|
||||||
|
|
|
@ -1,14 +1,3 @@
|
||||||
"""
|
|
||||||
Soubor sloužící k definici toho, co bude v adminu. Většinou pouhým zavoláním
|
|
||||||
funkce :func:`django.contrib.admin.site.register`, v případě, že chceme něco
|
|
||||||
upravit, tak jako třída rozšiřující :class:`django.contrib.admin.ModelAdmin`
|
|
||||||
s dekorátorem :func:`django.contrib.admin.register`.
|
|
||||||
|
|
||||||
Zde se definuje admin pro:
|
|
||||||
|
|
||||||
- :class:`~header_fotky.models.FotkaHeader`
|
|
||||||
- :class:`~header_fotky.models.FotkaUrlVazba`
|
|
||||||
"""
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.admin import ModelAdmin
|
from django.contrib.admin import ModelAdmin
|
||||||
import header_fotky.models as m
|
import header_fotky.models as m
|
||||||
|
@ -22,4 +11,4 @@ class FotkaPozadiAdmin(ModelAdmin):
|
||||||
readonly_fields = ['cas']
|
readonly_fields = ['cas']
|
||||||
|
|
||||||
admin.site.register(m.FotkaHeader, FotkaPozadiAdmin)
|
admin.site.register(m.FotkaHeader, FotkaPozadiAdmin)
|
||||||
admin.site.register(m.FotkaUrlVazba)
|
admin.site.register(m.FotkaUrlVazba)
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
"""
|
|
||||||
Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace.
|
|
||||||
"""
|
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class HeaderFotkyConfig(AppConfig):
|
class HeaderFotkyConfig(AppConfig):
|
||||||
name = 'header_fotky'
|
name = 'header_fotky'
|
||||||
|
verbose_name = 'Fotky v záhlaví'
|
||||||
|
|
|
@ -1,17 +1,3 @@
|
||||||
"""
|
|
||||||
Tento soubor slouží k definici databázového modelu.
|
|
||||||
|
|
||||||
Třídy rozšiřují většinou :class:`django.db.models.Model` a jejich atributy jsou
|
|
||||||
většinou sloupce v databázi (tj. nastaví se na hodnotu něčeho z :mod:`django.db.models`).
|
|
||||||
Na výběr jsou:
|
|
||||||
|
|
||||||
- :class:`django.db.models.TextField`
|
|
||||||
- :class:`django.db.models.ForeignKey`
|
|
||||||
- :class:`django.db.models.DateField`
|
|
||||||
- :class:`django.db.models.DateTimeField`
|
|
||||||
- :class:`django.db.models.ImageField`
|
|
||||||
- :class:`django.db.models.CharField`
|
|
||||||
"""
|
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
- korektura potrebuje reakci
|
|
||||||
+ komentáře fixně na username
|
|
||||||
- používat skutečné jméno?
|
|
||||||
- vyžádat pozornost autora obsahu
|
|
||||||
- zvednout upload limit na 5MB
|
|
||||||
- sbalit a rozbalit korekturu
|
|
||||||
- nahrávání jiných věcí než PDF - kontrolovat?
|
|
||||||
- stylování
|
|
||||||
- seznam PDF - co zobrazovat?
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,3 @@
|
||||||
"""
|
|
||||||
Soubor sloužící k definici toho, co bude v adminu. Většinou pouhým zavoláním
|
|
||||||
funkce :func:`django.contrib.admin.site.register`, v případě, že chceme něco
|
|
||||||
upravit, tak jako třída rozšiřující :class:`django.contrib.admin.ModelAdmin`
|
|
||||||
s dekorátorem :func:`django.contrib.admin.register`.
|
|
||||||
|
|
||||||
Zde se definuje admin pro:
|
|
||||||
|
|
||||||
- :class:`korektury.models.KorekturovanePDF`
|
|
||||||
"""
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from reversion.admin import VersionAdmin
|
from reversion.admin import VersionAdmin
|
||||||
from korektury.models import KorekturovanePDF
|
from korektury.models import KorekturovanePDF
|
||||||
|
@ -15,7 +5,6 @@ from korektury.models import KorekturovanePDF
|
||||||
from django.core.mail import EmailMessage
|
from django.core.mail import EmailMessage
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
# Register your models here.
|
|
||||||
class KorekturovanePDFAdmin(VersionAdmin):
|
class KorekturovanePDFAdmin(VersionAdmin):
|
||||||
"""
|
"""
|
||||||
nastaví čas vložení (:attr:`~koretkury.models.KorekturovanePDF.cas`) a počet
|
nastaví čas vložení (:attr:`~koretkury.models.KorekturovanePDF.cas`) a počet
|
||||||
|
@ -36,12 +25,13 @@ class KorekturovanePDFAdmin(VersionAdmin):
|
||||||
fieldsets = [
|
fieldsets = [
|
||||||
(None,
|
(None,
|
||||||
{'fields':
|
{'fields':
|
||||||
['pdf', 'cas', 'org', 'stran', 'nazev', 'komentar', 'poslat_mail']}),
|
['pdf', 'cas', 'stran', 'nazev', 'orgove', 'komentar', 'poslat_mail']}),
|
||||||
# (u'PDF', {'fields': ['pdf']}),
|
# (u'PDF', {'fields': ['pdf']}),
|
||||||
]
|
]
|
||||||
list_display = ['nazev', 'cas', 'stran', 'org']
|
list_display = ['nazev', 'cas', 'stran']
|
||||||
list_filter = []
|
list_filter = []
|
||||||
search_fields = []
|
search_fields = []
|
||||||
|
autocomplete_fields = ['orgove']
|
||||||
|
|
||||||
def save_model(self, request, obj, form, change):
|
def save_model(self, request, obj, form, change):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,13 +1,3 @@
|
||||||
"""
|
|
||||||
Formuláře (:class:`django.forms.Form`) umožňují jednoduchou tvorbu formulářů,
|
|
||||||
které lze pak jednoduše dát do frontendu i zpracovat na backendu.
|
|
||||||
|
|
||||||
Pro přidání políčka do formuláře je potřeba
|
|
||||||
- mít v modelu tu položku, kterou chci upravovat
|
|
||||||
- přidat do views (prihlaskaView, resitelEditView)
|
|
||||||
- přidat do forms
|
|
||||||
- includovat do html
|
|
||||||
"""
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
|
||||||
class OpravaForm(forms.Form):
|
class OpravaForm(forms.Form):
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Generated by Django 1.11.20 on 2019-04-30 21:40
|
# Generated by Django 1.11.20 on 2019-04-30 21:40
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Generated by Django 1.11.21 on 2019-06-10 21:58
|
# Generated by Django 1.11.21 on 2019-06-10 21:58
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
13
korektury/migrations/0021_auto_20240312_2124.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Generated by Django 4.2.8 on 2024-03-12 20:24
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('korektury', '0020_lepsi_popis_nazvu_PDF_v_adminu'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Generated by Django 4.2.11 on 2024-03-19 21:35
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('personalni', '0003_initial'),
|
||||||
|
('korektury', '0021_auto_20240312_2124'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='komentar',
|
||||||
|
name='autor',
|
||||||
|
field=models.ForeignKey(blank=True, help_text='Autor komentáře', null=True, on_delete=django.db.models.deletion.SET_NULL, to='personalni.organizator'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='korekturovanepdf',
|
||||||
|
name='org',
|
||||||
|
field=models.ForeignKey(blank=True, default=None, help_text='Zodpovědný organizátor za obsah', null=True, on_delete=django.db.models.deletion.SET_NULL, to='personalni.organizator'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='oprava',
|
||||||
|
name='autor',
|
||||||
|
field=models.ForeignKey(blank=True, help_text='Autor opravy', null=True, on_delete=django.db.models.deletion.SET_NULL, to='personalni.organizator'),
|
||||||
|
),
|
||||||
|
]
|
14
korektury/migrations/0023_personalni_post_migrate.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Generated by Django 4.2.11 on 2024-03-26 21:25
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('korektury', '0022_alter_komentar_autor_alter_korekturovanepdf_org_and_more'),
|
||||||
|
('personalni', '0005_personalni_post_migrate'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
41
korektury/migrations/0024_vic_orgu_k_pdf.py
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-06-11 23:53
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
def pridej_orgy(apps, schema_editor):
|
||||||
|
PDF = apps.get_model('korektury', 'KorekturovanePDF')
|
||||||
|
for pdf in PDF.objects.all(): # Tohle by asi mělo jít udělat pomocí update, ale moc práce a rychlé hledání taky nepomohlo.
|
||||||
|
if pdf.org is not None: pdf.orgove.add(pdf.org)
|
||||||
|
pdf.save() # ig?
|
||||||
|
|
||||||
|
def vyber_orga(apps, schema_editor):
|
||||||
|
PDF = apps.get_model('korektury', 'KorekturovanePDF')
|
||||||
|
for pdf in PDF.objects.all():
|
||||||
|
orgove = pdf.orgove.all()
|
||||||
|
if len(orgove) > 1:
|
||||||
|
raise migrations.exceptions.IrreversibleError(f'PDF {pdf.id} má víc než jednoho zodpovědného orga, nejde odmigrovat na verzi, která umí jen jednoho.')
|
||||||
|
if len(orgove) == 0:
|
||||||
|
pdf.org = None
|
||||||
|
else:
|
||||||
|
pdf.org = orgove[0]
|
||||||
|
pdf.save()
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('personalni', '0011_osloveni_vsechny_choices'),
|
||||||
|
('korektury', '0023_personalni_post_migrate'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='korekturovanepdf',
|
||||||
|
name='orgove',
|
||||||
|
field=models.ManyToManyField(blank=True, default=None, help_text='Zodpovědní organizátoři za obsah (chodí jim maily o nových korekturách)', to='personalni.organizator'),
|
||||||
|
),
|
||||||
|
migrations.RunPython(pridej_orgy, vyber_orga),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='korekturovanepdf',
|
||||||
|
name='org',
|
||||||
|
),
|
||||||
|
]
|
|
@ -1,27 +1,13 @@
|
||||||
"""
|
|
||||||
Tento soubor slouží k definici databázového modelu.
|
|
||||||
|
|
||||||
Třídy rozšiřují většinou :class:`django.db.models.Model` a jejich atributy jsou
|
|
||||||
většinou sloupce v databázi (tj. nastaví se na hodnotu něčeho z :mod:`django.db.models`).
|
|
||||||
Na výběr jsou:
|
|
||||||
|
|
||||||
- :class:`django.db.models.TextField`
|
|
||||||
- :class:`django.db.models.ForeignKey`
|
|
||||||
- :class:`django.db.models.DateField`
|
|
||||||
- :class:`django.db.models.DateTimeField`
|
|
||||||
- :class:`django.db.models.ImageField`
|
|
||||||
- :class:`django.db.models.CharField`
|
|
||||||
"""
|
|
||||||
import os
|
import os
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.urls import reverse
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.utils.encoding import force_text
|
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.text import get_valid_filename
|
from django.utils.text import get_valid_filename
|
||||||
|
|
||||||
from seminar.models import Organizator
|
from personalni.models import Organizator
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from reversion import revisions as reversion
|
from reversion import revisions as reversion
|
||||||
|
@ -41,7 +27,6 @@ def generate_filename(self, filename):
|
||||||
clean)
|
clean)
|
||||||
return os.path.join(settings.KOREKTURY_PDF_DIR, fname)
|
return os.path.join(settings.KOREKTURY_PDF_DIR, fname)
|
||||||
|
|
||||||
|
|
||||||
#@reversion.register(ignore_duplicates=True)
|
#@reversion.register(ignore_duplicates=True)
|
||||||
class KorekturovanePDF(models.Model):
|
class KorekturovanePDF(models.Model):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -61,9 +46,9 @@ class KorekturovanePDF(models.Model):
|
||||||
|
|
||||||
pdf = models.FileField(u'PDF', upload_to = generate_filename)
|
pdf = models.FileField(u'PDF', upload_to = generate_filename)
|
||||||
|
|
||||||
org = models.ForeignKey(Organizator, blank=True,
|
orgove = models.ManyToManyField(Organizator, blank=True,
|
||||||
help_text='Zodpovědný organizátor za obsah',
|
help_text='Zodpovědní organizátoři za obsah (chodí jim maily o nových korekturách)',
|
||||||
null=True, default=None, on_delete=models.SET_NULL)
|
default=None)
|
||||||
|
|
||||||
stran = models.IntegerField(u'počet stran', help_text='Počet stran PDF',
|
stran = models.IntegerField(u'počet stran', help_text='Počet stran PDF',
|
||||||
default=0)
|
default=0)
|
||||||
|
@ -144,6 +129,9 @@ class KorekturovanePDF(models.Model):
|
||||||
return nazev_split[0] # + " " + nazev_split[2]
|
return nazev_split[0] # + " " + nazev_split[2]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
return self.nazev
|
return self.nazev
|
||||||
|
|
||||||
|
def get_absolute_url(self):
|
||||||
|
return reverse('korektury', kwargs={'pdf': self.id})
|
||||||
|
|
||||||
|
|
||||||
@reversion.register(ignore_duplicates=True)
|
@reversion.register(ignore_duplicates=True)
|
||||||
|
|
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 702 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 1.1 KiB |
|
@ -1,3 +0,0 @@
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
|
@ -35,24 +35,27 @@ def create_test_pdf(rnd, organizatori):
|
||||||
|
|
||||||
# TODO silent ghostscript (vypisuje odstavec za každou stránku…)
|
# TODO silent ghostscript (vypisuje odstavec za každou stránku…)
|
||||||
|
|
||||||
KorekturovanePDF.objects.create(
|
korekturovane_pdf = KorekturovanePDF.objects.create(
|
||||||
nazev='B', komentar='Neuronové sítě', org=rnd.choice(organizatori), pdf=gen_filename(filename='B.pdf')
|
nazev='B', komentar='Neuronové sítě', pdf=gen_filename(filename='B.pdf')
|
||||||
)
|
|
||||||
|
|
||||||
KorekturovanePDF.objects.create(
|
|
||||||
nazev='A', komentar='M&M: Jak řešit?', org=rnd.choice(organizatori), pdf=gen_filename(filename='A.pdf')
|
|
||||||
)
|
)
|
||||||
|
korekturovane_pdf.orgove.set((rnd.choice(organizatori),))
|
||||||
|
|
||||||
korekturovane_pdf = KorekturovanePDF.objects.create(
|
korekturovane_pdf = KorekturovanePDF.objects.create(
|
||||||
nazev='A', komentar='M&M: Jak řešit?', org=rnd.choice(organizatori), pdf=gen_filename(filename='A.pdf'),
|
nazev='A', komentar='M&M: Jak řešit?', pdf=gen_filename(filename='A.pdf')
|
||||||
|
)
|
||||||
|
korekturovane_pdf.orgove.set(rnd.sample(organizatori, 2))
|
||||||
|
|
||||||
|
KorekturovanePDF.objects.create(
|
||||||
|
nazev='A', komentar='M&M: Jak řešit?', pdf=gen_filename(filename='A.pdf'),
|
||||||
status='zanaseni'
|
status='zanaseni'
|
||||||
)
|
)
|
||||||
|
|
||||||
KorekturovanePDF.objects.create(
|
korekturovane_pdf = KorekturovanePDF.objects.create(
|
||||||
nazev='A', komentar='M&M: Jak řešit?', org=rnd.choice(organizatori), pdf=gen_filename(filename='A.pdf'),
|
nazev='A', komentar='M&M: Jak řešit?', pdf=gen_filename(filename='A.pdf'),
|
||||||
status='zastarale'
|
status='zastarale'
|
||||||
)
|
)
|
||||||
except (FileNotFoundError, Exception) as e:
|
korekturovane_pdf.orgove.set((rnd.choice(organizatori),))
|
||||||
|
except OSError as e:
|
||||||
# TODO najít správné chyby, které vyhazují různé systémy při neexistenci ImageMagick, nebo knihoven
|
# TODO najít správné chyby, které vyhazují různé systémy při neexistenci ImageMagick, nebo knihoven
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
logger.error(
|
logger.error(
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
"""
|
|
||||||
Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují:
|
|
||||||
|
|
||||||
- ``korektury/`` (korektury_list) :class:`~korektury.views.KorekturySeskupeneListView`
|
|
||||||
- ``korektury/neseskupene/`` (korektury_neseskupene_list) :class:`~korektury.views.KorekturyAktualniListView`
|
|
||||||
- ``korektury/zastarale/`` (korektury_stare_list) :class:`~korektury.views.KorekturyZastaraleListView`
|
|
||||||
- ``korektury/<int:pdf>/`` (korektury) :class:`~korektury.views.KorekturyView`
|
|
||||||
"""
|
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
from seminar.utils import org_required
|
from personalni.utils import org_required
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
"""
|
|
||||||
Soubor sloužící k deklaraci jednotlivých „views“ (nejčastěji funkce beroucí request
|
|
||||||
a vracející :func:`django.shortcuts.render` respektive nějakou response, nebo
|
|
||||||
třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic`)
|
|
||||||
"""
|
|
||||||
from django.shortcuts import get_object_or_404, render
|
from django.shortcuts import get_object_or_404, render
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.http import HttpResponseForbidden
|
from django.http import HttpResponseForbidden
|
||||||
from django.core.mail import EmailMessage
|
from django.core.mail import EmailMessage
|
||||||
|
@ -189,9 +183,9 @@ class KorekturyView(generic.TemplateView):
|
||||||
if email_komentujiciho:
|
if email_komentujiciho:
|
||||||
emails.add(email_komentujiciho)
|
emails.add(email_komentujiciho)
|
||||||
|
|
||||||
# zodpovedny org
|
# zodpovedni orgove
|
||||||
if oprava.pdf.org:
|
for org in oprava.pdf.orgove.all():
|
||||||
email_zobpovedny = oprava.pdf.org.osoba.email
|
email_zobpovedny = org.osoba.email
|
||||||
if email_zobpovedny:
|
if email_zobpovedny:
|
||||||
emails.add(email_zobpovedny)
|
emails.add(email_zobpovedny)
|
||||||
|
|
||||||
|
@ -200,13 +194,6 @@ class KorekturyView(generic.TemplateView):
|
||||||
if email:
|
if email:
|
||||||
emails.discard(email)
|
emails.discard(email)
|
||||||
|
|
||||||
if not settings.POSLI_MAILOVOU_NOTIFIKACI:
|
|
||||||
print("Poslal bych upozornění na tyto adresy: ", " ".join(emails))
|
|
||||||
print("---- Upozornění:")
|
|
||||||
print(text)
|
|
||||||
print("---- Konec upozornění")
|
|
||||||
return
|
|
||||||
|
|
||||||
EmailMessage(
|
EmailMessage(
|
||||||
subject=subject,
|
subject=subject,
|
||||||
body=text,
|
body=text,
|
||||||
|
|
|
@ -7,5 +7,4 @@ make/install_web
|
||||||
ensure_venv
|
ensure_venv
|
||||||
./manage.py testdata
|
./manage.py testdata
|
||||||
./manage.py loaddata data/*
|
./manage.py loaddata data/*
|
||||||
make/sync_prod_flatpages
|
#make/sync_prod_flatpages
|
||||||
./manage.py load_org_permissions deploy_v2/admin_org_prava.json
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ function safe_checkout_branch {
|
||||||
echo >&2 "Změna v $SCRIPT, prosím pullni manuálně"
|
echo >&2 "Změna v $SCRIPT, prosím pullni manuálně"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
git checkout "$BRANCH"
|
git checkout "$BRANCH" --
|
||||||
git pull
|
git pull
|
||||||
git clean -f
|
git clean -f
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -exuo pipefail
|
||||||
. make/lib.sh
|
. make/lib.sh
|
||||||
|
|
||||||
scp vue_frontend/webpack-stats.json "$GIMLI_LOGIN:$TESTWEB/vue_frontend/"
|
scp vue_frontend/webpack-stats.json "$GIMLI_LOGIN:$TESTWEB/vue_frontend/"
|
||||||
rsync -ave ssh seminar/static/seminar/vue "$GIMLI_LOGIN:$TESTWEB/seminar/static/seminar/"
|
rsync -ave ssh treenode/static/treenode/vue "$GIMLI_LOGIN:$TESTWEB/treenode/static/treenode/"
|
||||||
ssh "$GIMLI_LOGIN" "
|
ssh "$GIMLI_LOGIN" "
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
cd $TESTWEB
|
cd $TESTWEB
|
||||||
|
|
|
@ -5,5 +5,4 @@ set -exuo pipefail
|
||||||
|
|
||||||
ensure_web_installed
|
ensure_web_installed
|
||||||
|
|
||||||
./manage.py graph_models seminar | dot -Tpdf > schema_seminar.pdf
|
|
||||||
./manage.py graph_models -a -g | dot -Tpdf > schema_all.pdf
|
./manage.py graph_models -a -g | dot -Tpdf > schema_all.pdf
|
||||||
|
|
|
@ -7,17 +7,18 @@ import locale
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.admin import AdminSite
|
from django.contrib.admin import AdminSite
|
||||||
from django.contrib.flatpages.models import FlatPage
|
from django.contrib.flatpages.models import FlatPage
|
||||||
|
import logging
|
||||||
|
|
||||||
# Note: we are renaming the original Admin and Form as we import them!
|
# Note: we are renaming the original Admin and Form as we import them!
|
||||||
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
|
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
|
||||||
from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld
|
from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from ckeditor_uploader.widgets import CKEditorUploadingWidget
|
from django_ckeditor_5.widgets import CKEditor5Widget
|
||||||
|
|
||||||
|
|
||||||
class FlatpageForm(FlatpageFormOld):
|
class FlatpageForm(FlatpageFormOld):
|
||||||
content = forms.CharField(widget=CKEditorUploadingWidget())
|
content = forms.CharField(widget=CKEditor5Widget())
|
||||||
class Meta:
|
class Meta:
|
||||||
model = FlatPage # this is not automatically inherited from FlatpageFormOld
|
model = FlatPage # this is not automatically inherited from FlatpageFormOld
|
||||||
exclude = []
|
exclude = []
|
||||||
|
@ -35,19 +36,34 @@ locale.setlocale(locale.LC_COLLATE, 'cs_CZ.UTF-8')
|
||||||
|
|
||||||
# https://books.agiliq.com/projects/django-admin-cookbook/en/latest/set_ordering.html
|
# https://books.agiliq.com/projects/django-admin-cookbook/en/latest/set_ordering.html
|
||||||
# FIXME zpraseno pomocí toho, že Python umí bez problému přepisovat funkce
|
# FIXME zpraseno pomocí toho, že Python umí bez problému přepisovat funkce
|
||||||
def get_app_list(self, request):
|
def get_app_list(self, request, app_label=None):
|
||||||
"""
|
"""
|
||||||
Return a sorted list of all the installed apps that have been
|
Return a sorted list of all the installed apps that have been
|
||||||
registered in this site.
|
registered in this site.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
app_dict = self._build_app_dict(request)
|
app_dict = self._build_app_dict(request, label=app_label)
|
||||||
# Sort the apps alphabetically.
|
aplikace_nahore = [
|
||||||
app_list = sorted(app_dict.values(), key=lambda x: locale.strxfrm('!') if (x['name'] == "Seminar") else locale.strxfrm(x['name'].lower()))
|
'tvorba',
|
||||||
|
'personalni',
|
||||||
|
'novinky',
|
||||||
|
'korektury',
|
||||||
|
'various',
|
||||||
|
'prednasky',
|
||||||
|
'soustredeni',
|
||||||
|
]
|
||||||
|
# Odhlášený admin má prázdný app_dict :-/
|
||||||
|
app_list = [app_dict[label] for label in aplikace_nahore if label in app_dict] + [app_dict[label] for label in app_dict if label not in aplikace_nahore]
|
||||||
|
|
||||||
|
|
||||||
# Sort the models alphabetically within each app.
|
# Sort the models alphabetically within each app.
|
||||||
for app in app_list:
|
try: # na macu nefunguje locale.strxfrm :-/ proto je tu try except block
|
||||||
app['models'].sort(key=lambda x: locale.strxfrm('žž' + x['name'].lower()) if (x['name'].endswith("(Node)")) else locale.strxfrm(x['name'].lower()))
|
for app in app_list:
|
||||||
|
app['models'].sort(key=lambda x: locale.strxfrm(x['name'].lower()))
|
||||||
|
except OSError as e:
|
||||||
|
# locale.strxfrm nefunguje na macu... :-/ -> neprovede se řazení
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
logger.error(e)
|
||||||
|
|
||||||
return app_list
|
return app_list
|
||||||
|
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
from datetime import datetime, date
|
|
||||||
|
|
||||||
from django.conf import settings
|
|
||||||
from django.http import HttpResponse, HttpResponseRedirect
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LoggedInHintCookieMiddleware(object):
|
|
||||||
"""Middleware to securely help with 'logged-in' detection for dual HTTP/HTTPS sites.
|
|
||||||
|
|
||||||
On insecure requests: Checks for a (non-secure) cookie settings.LOGGED_IN_HINT_COOKIE_NAME
|
|
||||||
and if present, redirects to HTTPS (same adress).
|
|
||||||
Note this usually breaks non-GET (POST) requests.
|
|
||||||
|
|
||||||
On secure requests: Updates cookie settings.LOGGED_IN_HINT_COOKIE_NAME to reflect
|
|
||||||
whether an user is logged in in the current session (cookie set to 'True' or cleared).
|
|
||||||
The cookie is set to expire at the same time as the sessionid cookie.
|
|
||||||
|
|
||||||
By default, LOGGED_IN_HINT_COOKIE_NAME = 'logged_in_hint'.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
if hasattr(settings, 'LOGGED_IN_HINT_COOKIE_NAME'):
|
|
||||||
self.cookie_name = settings.LOGGED_IN_HINT_COOKIE_NAME
|
|
||||||
else: self.cookie_name = 'logged_in_hint'
|
|
||||||
self.cookie_value = 'True'
|
|
||||||
|
|
||||||
def cookie_correct(self, request):
|
|
||||||
return self.cookie_name in request.COOKIES and request.COOKIES[self.cookie_name] == self.cookie_value
|
|
||||||
|
|
||||||
def process_request(self, request):
|
|
||||||
if not request.is_secure():
|
|
||||||
if self.cookie_correct(request):
|
|
||||||
# redirect insecure (assuming http) requests with hint cookie to https
|
|
||||||
url = request.build_absolute_uri()
|
|
||||||
assert url[:5] == 'http:'
|
|
||||||
return HttpResponseRedirect('https:' + url[5:])
|
|
||||||
return None
|
|
||||||
|
|
||||||
def process_response(self, request, response):
|
|
||||||
if request.is_secure():
|
|
||||||
# assuming full session info (as the conn. is secure)
|
|
||||||
try:
|
|
||||||
user = request.user
|
|
||||||
except AttributeError: # no user - ajax or other special request
|
|
||||||
return response
|
|
||||||
if user.is_authenticated():
|
|
||||||
if not self.cookie_correct(request):
|
|
||||||
expiry = None if request.session.get_expire_at_browser_close() else request.session.get_expiry_date()
|
|
||||||
response.set_cookie(self.cookie_name, value=self.cookie_value, expires=expiry, secure=False)
|
|
||||||
else:
|
|
||||||
if self.cookie_name in request.COOKIES:
|
|
||||||
response.delete_cookie(self.cookie_name)
|
|
||||||
return response
|
|
||||||
|
|
||||||
|
|
||||||
class vzhled:
|
|
||||||
|
|
||||||
def process_request(self, request):
|
|
||||||
return None
|
|
||||||
|
|
||||||
def process_view(self, request, view_func, view_args, view_kwargs):
|
|
||||||
#print "====== process_request ======"
|
|
||||||
#print view_func
|
|
||||||
#print view_args
|
|
||||||
#print view_kwargs
|
|
||||||
#print "============================="
|
|
||||||
return None
|
|
||||||
|
|
||||||
def process_template_response(self, request, response):
|
|
||||||
hodin = datetime.now().hour
|
|
||||||
if (hodin <= 6) or (hodin >= 14): # TODO 20
|
|
||||||
response.context_data['noc'] = True
|
|
||||||
else:
|
|
||||||
response.context_data['noc'] = False
|
|
||||||
return response
|
|
||||||
|
|
||||||
def process_response(self, request, response):
|
|
||||||
#hodin = datetime.now().hour
|
|
||||||
#if (hodin <= 6) or (hodin >= 14): # TODO 20
|
|
||||||
#response.context_data['noc'] = True
|
|
||||||
#else:
|
|
||||||
#response.context_data['noc'] = False
|
|
||||||
return response
|
|
||||||
|
|
||||||
|
|
||||||
##def process_exception(request, exception):
|
|
||||||
#pass
|
|
|
@ -28,7 +28,6 @@ APPEND_SLASH = True
|
||||||
LANGUAGE_CODE = 'cs'
|
LANGUAGE_CODE = 'cs'
|
||||||
TIME_ZONE = 'Europe/Prague'
|
TIME_ZONE = 'Europe/Prague'
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
USE_L10N = True
|
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
|
|
||||||
# Static files (CSS, JavaScript, Images)
|
# Static files (CSS, JavaScript, Images)
|
||||||
|
@ -54,6 +53,9 @@ LOGIN_REDIRECT_URL = 'profil'
|
||||||
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
|
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
|
||||||
DOBA_ODHLASENI_PRI_ZASKRTNUTI_NEODHLASOVAT = 365 * 24 * 3600 # rok
|
DOBA_ODHLASENI_PRI_ZASKRTNUTI_NEODHLASOVAT = 365 * 24 * 3600 # rok
|
||||||
|
|
||||||
|
# View pro chybu s CSRF tokenem (např. se sušenkami)
|
||||||
|
CSRF_FAILURE_VIEW = 'various.views.csrf.csrf_error'
|
||||||
|
|
||||||
# Modules configuration
|
# Modules configuration
|
||||||
|
|
||||||
AUTHENTICATION_BACKENDS = (
|
AUTHENTICATION_BACKENDS = (
|
||||||
|
@ -66,9 +68,6 @@ MIDDLEWARE = (
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
# FIXME: rozbilo se při přechodu na Django 2.0, nevím, jestli
|
|
||||||
# se to dá zahodit bez náhrady
|
|
||||||
# 'mamweb.middleware.LoggedInHintCookieMiddleware',
|
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
|
@ -85,10 +84,10 @@ TEMPLATES = [
|
||||||
'django.contrib.auth.context_processors.auth',
|
'django.contrib.auth.context_processors.auth',
|
||||||
'django.template.context_processors.request',
|
'django.template.context_processors.request',
|
||||||
'django.contrib.messages.context_processors.messages',
|
'django.contrib.messages.context_processors.messages',
|
||||||
'sekizai.context_processors.sekizai',
|
|
||||||
'header_fotky.context_processors.vzhled',
|
'header_fotky.context_processors.vzhled',
|
||||||
'various.context_processors.rozliseni',
|
'various.context_processors.rozliseni',
|
||||||
'various.context_processors.april',
|
'various.context_processors.april',
|
||||||
|
'various.context_processors.halloween',
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -108,19 +107,14 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
'sekizai',
|
|
||||||
'reversion',
|
'reversion',
|
||||||
'django_countries',
|
'django_countries',
|
||||||
'solo',
|
'solo',
|
||||||
'ckeditor',
|
'django_ckeditor_5',
|
||||||
'ckeditor_uploader',
|
|
||||||
'taggit',
|
'taggit',
|
||||||
'dal',
|
'dal',
|
||||||
'dal_select2',
|
'dal_select2',
|
||||||
|
|
||||||
'crispy_forms',
|
|
||||||
'django_comments',
|
|
||||||
|
|
||||||
'django.contrib.flatpages',
|
'django.contrib.flatpages',
|
||||||
'django.contrib.humanize',
|
'django.contrib.humanize',
|
||||||
|
|
||||||
|
@ -137,6 +131,7 @@ INSTALLED_APPS = (
|
||||||
# MaMweb
|
# MaMweb
|
||||||
'mamweb',
|
'mamweb',
|
||||||
'seminar',
|
'seminar',
|
||||||
|
'tvorba',
|
||||||
'galerie',
|
'galerie',
|
||||||
'korektury',
|
'korektury',
|
||||||
'prednasky',
|
'prednasky',
|
||||||
|
@ -151,6 +146,8 @@ INSTALLED_APPS = (
|
||||||
'soustredeni',
|
'soustredeni',
|
||||||
'treenode',
|
'treenode',
|
||||||
'vyroci',
|
'vyroci',
|
||||||
|
'sifrovacka',
|
||||||
|
'novinky',
|
||||||
|
|
||||||
# Admin upravy:
|
# Admin upravy:
|
||||||
|
|
||||||
|
@ -188,26 +185,98 @@ SUMMERNOTE_CONFIG = {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
CKEDITOR_UPLOAD_PATH = "uploads/"
|
CKEDITOR_5_CUSTOM_CSS = "css/ckeditor5_fix.css"
|
||||||
CKEDITOR_IMAGE_BACKEND = 'pillow'
|
# customColorPalette = [
|
||||||
#CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
|
# {
|
||||||
CKEDITOR_CONFIGS = {
|
# 'color': 'hsl(4, 90%, 58%)',
|
||||||
|
# 'label': 'Red',
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# 'color': 'hsl(340, 82%, 52%)',
|
||||||
|
# 'label': 'Pink',
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# 'color': 'hsl(291, 64%, 42%)',
|
||||||
|
# 'label': 'Purple',
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# 'color': 'hsl(262, 52%, 47%)',
|
||||||
|
# 'label': 'Deep Purple',
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# 'color': 'hsl(231, 48%, 48%)',
|
||||||
|
# 'label': 'Indigo',
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# 'color': 'hsl(207, 90%, 54%)',
|
||||||
|
# 'label': 'Blue',
|
||||||
|
# },
|
||||||
|
# ]
|
||||||
|
CKEDITOR_5_FILE_STORAGE = "various.storage.UploadStorage"
|
||||||
|
CKEDITOR_5_CONFIGS = {
|
||||||
'default': {
|
'default': {
|
||||||
'entities': False,
|
'language': 'cs',
|
||||||
'toolbar': [
|
'blockToolbar': [
|
||||||
['Source', 'ShowBlocks', '-', 'Maximize'],
|
'paragraph', 'heading1', 'heading2', 'heading3',
|
||||||
['Bold', 'Italic', 'Subscript', 'Superscript', '-', 'RemoveFormat'],
|
'|',
|
||||||
['NumberedList','BulletedList','-','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
'bulletedList', 'numberedList',
|
||||||
['Link', 'Unlink', 'Anchor', '-', 'Image', 'Table', 'HorizontalRule'],
|
'|',
|
||||||
['Format'],
|
'blockQuote',
|
||||||
|
|
||||||
],
|
],
|
||||||
# 'toolbar': 'full',
|
'toolbar': ['sourceEditing', '|', 'heading', '|',
|
||||||
'height': '40em',
|
# 'outdent', 'indent', '|',
|
||||||
'width': '100%',
|
'bold', 'italic', 'link', 'underline', 'strikethrough',
|
||||||
'toolbarStartupExpanded': False,
|
'code',
|
||||||
'allowedContent' : True,
|
# 'subscript', 'superscript',
|
||||||
|
# 'highlight',
|
||||||
|
'|', 'codeBlock', 'insertImage',
|
||||||
|
'bulletedList', 'numberedList', 'todoList', '|',
|
||||||
|
# 'blockQuote', '|',
|
||||||
|
# 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor',
|
||||||
|
# 'mediaEmbed',
|
||||||
|
'removeFormat',
|
||||||
|
# 'insertTable',
|
||||||
|
],
|
||||||
|
'image': {
|
||||||
|
'toolbar': ['imageTextAlternative', '|', 'imageStyle:alignLeft',
|
||||||
|
'imageStyle:alignRight', 'imageStyle:alignCenter', 'imageStyle:side', '|'],
|
||||||
|
'styles': [
|
||||||
|
'full',
|
||||||
|
'side',
|
||||||
|
'alignLeft',
|
||||||
|
'alignRight',
|
||||||
|
'alignCenter',
|
||||||
|
]
|
||||||
|
|
||||||
|
},
|
||||||
|
# 'table': {
|
||||||
|
# 'contentToolbar': [ 'tableColumn', 'tableRow', 'mergeTableCells',
|
||||||
|
# 'tableProperties', 'tableCellProperties' ],
|
||||||
|
# 'tableProperties': {
|
||||||
|
# 'borderColors': customColorPalette,
|
||||||
|
# 'backgroundColors': customColorPalette,
|
||||||
|
# },
|
||||||
|
# 'tableCellProperties': {
|
||||||
|
# 'borderColors': customColorPalette,
|
||||||
|
# 'backgroundColors': customColorPalette,
|
||||||
|
# }
|
||||||
|
# },
|
||||||
|
'heading' : {
|
||||||
|
'options': [
|
||||||
|
{ 'model': 'paragraph', 'title': 'Paragraph', 'class': 'ck-heading_paragraph' },
|
||||||
|
{ 'model': 'heading1', 'view': 'h1', 'title': 'Heading 1', 'class': 'ck-heading_heading1' },
|
||||||
|
{ 'model': 'heading2', 'view': 'h2', 'title': 'Heading 2', 'class': 'ck-heading_heading2' },
|
||||||
|
{ 'model': 'heading3', 'view': 'h3', 'title': 'Heading 3', 'class': 'ck-heading_heading3' },
|
||||||
|
]
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
'list': {
|
||||||
|
'properties': {
|
||||||
|
'styles': 'true',
|
||||||
|
'startIndex': 'true',
|
||||||
|
'reversed': 'true',
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Webpack loader
|
# Webpack loader
|
||||||
|
@ -281,11 +350,11 @@ LOGGING = {
|
||||||
'filters': ['Http404AsInfo'],
|
'filters': ['Http404AsInfo'],
|
||||||
},
|
},
|
||||||
|
|
||||||
'seminar.prihlaska.form':{
|
'personalni.prihlaska.form':{
|
||||||
'handlers': ['console','registration_logfile'],
|
'handlers': ['console','registration_logfile'],
|
||||||
'level': 'INFO'
|
'level': 'INFO'
|
||||||
},
|
},
|
||||||
'seminar.prihlaska.problem':{
|
'personalni.prihlaska.problem':{
|
||||||
'handlers': ['console','mail_registration','registration_error_log'],
|
'handlers': ['console','mail_registration','registration_error_log'],
|
||||||
'level': 'INFO'
|
'level': 'INFO'
|
||||||
},
|
},
|
||||||
|
@ -344,10 +413,7 @@ SEMINAR_KONFERY_DIR = os.path.join('konfery')
|
||||||
KOREKTURY_PDF_DIR = os.path.join('korektury', 'pdf')
|
KOREKTURY_PDF_DIR = os.path.join('korektury', 'pdf')
|
||||||
KOREKTURY_IMG_DIR = os.path.join('korektury', 'img')
|
KOREKTURY_IMG_DIR = os.path.join('korektury', 'img')
|
||||||
CISLO_IMG_DIR = os.path.join('cislo', 'img')
|
CISLO_IMG_DIR = os.path.join('cislo', 'img')
|
||||||
|
SOUSTREDENI_KONTAKTNICKY_DIR = os.path.join('soustredeni', 'kontaktnicky')
|
||||||
|
|
||||||
# E-MAIL NOTIFICATIONS
|
|
||||||
POSLI_MAILOVOU_NOTIFIKACI = False
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -20,15 +18,18 @@ INSTALLED_APPS += (
|
||||||
)
|
)
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
assert not SECRET_KEY.startswith('12345')
|
# `'DOCUTILSCONFIG' in os.environ` kvůli sphinxu
|
||||||
|
# FIXME zjistit, zda je bezpečné a zda se to nedá udělat lépe
|
||||||
|
assert 'DOCUTILSCONFIG' in os.environ or not SECRET_KEY.startswith('12345')
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
TEMPLATE_DEBUG = False
|
TEMPLATE_DEBUG = False
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['mam.mff.cuni.cz', 'www.mam.mff.cuni.cz', 'atrey.karlin.mff.cuni.cz',
|
ALLOWED_HOSTS = ['mam.mff.cuni.cz', # Hlavní a asi jediná funkční adresa
|
||||||
'mamweb.bezva.org','gimli.ms.mff.cuni.cz']
|
'mam.matfyz.cz', # Ne že by se tohle použilo, ale pro potenciální případ změny…
|
||||||
|
]
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
||||||
|
@ -67,5 +68,4 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/
|
||||||
|
|
||||||
|
|
||||||
# E-MAIL NOTIFICATIONS
|
# E-MAIL NOTIFICATIONS
|
||||||
POSLI_MAILOVOU_NOTIFIKACI = True
|
|
||||||
LOCAL_TEST_PROD = "prod"
|
LOCAL_TEST_PROD = "prod"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -32,7 +30,10 @@ DEBUG = True
|
||||||
|
|
||||||
TEMPLATES[0]['OPTIONS']['debug'] = True
|
TEMPLATES[0]['OPTIONS']['debug'] = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['*.mam.mff.cuni.cz', 'atrey.karlin.mff.cuni.cz', 'mam.mff.cuni.cz', 'mam-test.kam.mff.cuni.cz', 'gimli.ms.mff.cuni.cz', 'mam-test.ks.matfyz.cz']
|
ALLOWED_HOSTS = [
|
||||||
|
'mam-test.ks.matfyz.cz',
|
||||||
|
'*.mam.mff.cuni.cz', # Asi se nikdy nepoužije…
|
||||||
|
]
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
||||||
|
@ -71,7 +72,6 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/
|
||||||
FILE_UPLOAD_PERMISSIONS = 0o440
|
FILE_UPLOAD_PERMISSIONS = 0o440
|
||||||
|
|
||||||
# Testování e-mailů
|
# Testování e-mailů
|
||||||
POSLI_MAILOVOU_NOTIFIKACI = True
|
|
||||||
EMAIL_BACKEND = 'various.mail_prefixer.PrefixingMailBackend'
|
EMAIL_BACKEND = 'various.mail_prefixer.PrefixingMailBackend'
|
||||||
# TODO Pouze na otestování testu… Zvolit konferu!
|
# TODO Pouze na otestování testu… Zvolit konferu!
|
||||||
# XXX: Je to pole, protože implementační detail backendu.
|
# XXX: Je to pole, protože implementační detail backendu.
|
||||||
|
|