Merge branch 'develop' into test
This commit is contained in:
commit
001e6eb7c3
10 changed files with 232 additions and 8 deletions
7
Makefile
7
Makefile
|
@ -102,10 +102,10 @@ deploy_prod: venv_check
|
|||
sync_prod_flatpages: venv_check
|
||||
@echo Downloading current version of flatpages from mamweb-prod.
|
||||
ssh mam-web@gimli.ms.mff.cuni.cz \
|
||||
"cd /akce/mam/www/mamweb-prod; . env/bin/activate; ./manage.py dumpdata flatpages --indent=2 > flat.json"
|
||||
rsync -ave ssh mam-web@gimli.ms.mff.cuni.cz:/akce/mam/www/mamweb-prod/flat.json ./flat.json
|
||||
"cd /akce/mam/www/mamweb-prod; . env/bin/activate; ./manage.py dumpdata flatpages --indent=2 > flat.json; ./fix_json.py flat.json flat_fixed.json"
|
||||
rsync -ave ssh mam-web@gimli.ms.mff.cuni.cz:/akce/mam/www/mamweb-prod/flat_fixed.json data/flat.json
|
||||
@echo "Applying downloaded flatpages."
|
||||
./manage.py loaddata flat.json
|
||||
./manage.py loaddata data/flat.json
|
||||
@echo "Done."
|
||||
|
||||
# Sync test media directory with production
|
||||
|
@ -132,6 +132,7 @@ sync_test_db_aggressive:
|
|||
bash -c "psql mam_test <<< 'DROP OWNED BY \"mam-web\";'"
|
||||
pg_restore -c --if-exists -d mam_test dump-prod.sql
|
||||
rm dump-prod.sql
|
||||
bash -c "psql mam_test <<< UPDATE django_site SET name=\'MaMweb (test)\', domain=\'mam-test.ks.matfyz.cz\' WHERE id=1"
|
||||
@echo Done.
|
||||
|
||||
# Sync test with production
|
||||
|
|
201
data/flat.json
201
data/flat.json
File diff suppressed because one or more lines are too long
|
@ -6,5 +6,4 @@ urlpatterns = [
|
|||
path('korektury/', org_required(views.KorekturySeskupeneListView.as_view()), name='korektury_list'),
|
||||
path('korektury/zastarale/', org_required(views.KorekturyZastaraleListView.as_view()), name='korektury_stare_list'),
|
||||
path('korektury/<int:pdf>/', org_required(views.KorekturyView.as_view()), name='korektury'),
|
||||
path('korektury/help/', org_required(views.KorekturyHelpView.as_view()), name='korektury-help'),
|
||||
]
|
||||
|
|
|
@ -79,6 +79,7 @@ TEMPLATES = [
|
|||
'django.contrib.messages.context_processors.messages',
|
||||
'sekizai.context_processors.sekizai',
|
||||
'header_fotky.context_processors.vzhled',
|
||||
'various.context_processors.rozliseni',
|
||||
'various.context_processors.april',
|
||||
)
|
||||
},
|
||||
|
|
|
@ -97,3 +97,4 @@ LOGGING = {
|
|||
# E-maily posílat chceme, ale do terminálu :-)
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
SEND_EMAIL_NOTIFICATIONS = True
|
||||
LOCAL_TEST_PROD = "local"
|
||||
|
|
|
@ -67,3 +67,4 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/
|
|||
|
||||
# E-MAIL NOTIFICATIONS
|
||||
POSLI_MAILOVOU_NOTIFIKACI = True
|
||||
LOCAL_TEST_PROD = "prod"
|
||||
|
|
|
@ -76,3 +76,4 @@ EMAIL_BACKEND = 'various.mail_prefixer.PrefixingMailBackend'
|
|||
# TODO Pouze na otestování testu… Zvolit konferu!
|
||||
# XXX: Je to pole, protože implementační detail backendu.
|
||||
TESTOVACI_EMAILOVA_KONFERENCE = ['betatest@mam.mff.cuni.cz']
|
||||
LOCAL_TEST_PROD = "test"
|
||||
|
|
|
@ -1182,3 +1182,21 @@ div.gdpr {
|
|||
label[for=id_skola] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.localweb {
|
||||
border-left: 20px solid greenyellow;
|
||||
border-right: 20px solid greenyellow;
|
||||
}
|
||||
|
||||
.localweb .login-bar {
|
||||
margin-left: -20px;
|
||||
}
|
||||
|
||||
.testweb {
|
||||
border-left: 20px solid darkorange;
|
||||
border-right: 20px solid darkorange;
|
||||
}
|
||||
|
||||
.testweb .login-bar {
|
||||
margin-left: -20px;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
{% block script %}{% endblock %}
|
||||
|
||||
</head>
|
||||
<body class='{% if user.is_staff %}org-logged-in{% endif %}'>
|
||||
<body class='{{ LOCAL_TEST_PROD }}web{% if user.is_staff %} org-logged-in{% endif %}'>
|
||||
|
||||
{% if user.is_staff %}
|
||||
<div class="login-bar" >
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
from django.conf import settings
|
||||
|
||||
|
||||
def april(req):
|
||||
if 'X-April' in req.headers:
|
||||
try:
|
||||
|
@ -12,3 +15,7 @@ def april(req):
|
|||
return {'april': today.year}
|
||||
return {}
|
||||
|
||||
|
||||
def rozliseni(request):
|
||||
return {"LOCAL_TEST_PROD": settings.LOCAL_TEST_PROD}
|
||||
|
||||
|
|
Loading…
Reference in a new issue