1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pytition_ynh.git synced 2024-09-03 20:16:08 +02:00

Update to Pytition 2.5.1 and fix user image uploads and TinyMCE editors

When uploading images in mediaroot, files must have gid www-data
so that nginx can serve them.
Also, image upload script URL for TinyMCE editor was wrong if STATIC_ROOT
is not '/static/'
Tinymce js url was wrong in this case also.
This commit is contained in:
Yann Sionneau 2022-05-14 15:26:37 +02:00 committed by Salamandar
parent 754477db25
commit 43c31c10a3
5 changed files with 9 additions and 5 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/pytition/Pytition/archive/refs/tags/v2.4.tar.gz SOURCE_URL=https://github.com/pytition/Pytition/archive/refs/tags/v2.5.1.tar.gz
SOURCE_SUM=466c788139fc90049a42d084472df36ea0f15b46766777f248ce989e3dbebcc4 SOURCE_SUM=cc65f0b10d0e38f89adeba64a2db2439721d564528ee278cf65dbc371982f501
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -28,6 +28,10 @@ ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '[::1]', '__DOMAIN__']
import os import os
# This needs to be redefined because STATIC_URL might be set in this config
# after TINYMCE_JS_URL was defined
TINYMCE_JS_URL = STATIC_URL + TINYMCE_JS_PATH
if DEFAULT_INDEX_THUMBNAIL == "": if DEFAULT_INDEX_THUMBNAIL == "":
print("Please set a default index thumbnail or your index page will not be very beautiful") print("Please set a default index thumbnail or your index page will not be very beautiful")

View file

@ -6,7 +6,7 @@ After=network.target mysql.service
[Service] [Service]
Type=notify Type=notify
User=__APP__ User=__APP__
Group=__APP__ Group=www-data
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
RuntimeDirectory=__APP__ RuntimeDirectory=__APP__
ExecStart=uwsgi --yaml __FINALPATH__/uwsgi.yaml --die-on-term ExecStart=uwsgi --yaml __FINALPATH__/uwsgi.yaml --die-on-term

View file

@ -1,7 +1,7 @@
uwsgi: uwsgi:
# Who will run the code # Who will run the code
uid: __APP__ uid: __APP__
gid: __APP__ gid: www-data
# Number of workers # Number of workers
workers: 10 workers: 10

View file

@ -6,7 +6,7 @@
"en": "Host privacy-friendly online petitions", "en": "Host privacy-friendly online petitions",
"fr": "Hébergez des pétitions en ligne respectueuses de la vie privée" "fr": "Hébergez des pétitions en ligne respectueuses de la vie privée"
}, },
"version": "2.4~ynh1", "version": "2.5.1~ynh1",
"url": "https://example.com", "url": "https://example.com",
"upstream": { "upstream": {
"license": "BSD-3-Clause", "license": "BSD-3-Clause",