feat(settings): allow overriding static files

cm-remove-jet
Christian Merten 9 months ago
parent fb3d37ff4f
commit 1fe37023de
Signed by: christian.merten
GPG Key ID: D953D69721B948B3

@ -125,13 +125,14 @@ AUTH_PASSWORD_VALIDATORS = [
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATICFILES_DIRS = [ STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static") os.path.join(CONFIG_DIR_PATH, "static"),
os.path.join(BASE_DIR, "static"),
] ]
# static root where all the static files are collected to # static root where all the static files are collected to
# use python3 manage.py collectstatic to collect static files in the STATIC_ROOT # use python3 manage.py collectstatic to collect static files in the STATIC_ROOT
# this is needed for deployment # this is needed for deployment
STATIC_ROOT = get_var('django', 'static_root', default='/var/www/jdav_web/static') STATIC_ROOT = get_var('django', 'static_root', default='/var/www/jdav_web/static')
DEFAULT_STATIC_PATH = get_var('django', 'default_static_path', default='/app/jdav_web/static')
# Locale files (translations) # Locale files (translations)

@ -1,4 +1,4 @@
{% load tex_extras %} {% load static common tex_extras %}
\documentclass[a4paper]{article} \documentclass[a4paper]{article}
@ -49,7 +49,10 @@
} }
\begin{document} \begin{document}
% HEADER RIGHT % HEADER RIGHT
\picpos{4.5cm}{12cm}{0cm}{/app/jdav_web/static/general/img/dav_logo_sektion.png} {% settings_value 'DEFAULT_STATIC_PATH' as static_root %}
\picpos{4.5cm}{11.5cm}{0cm}{%
{{ static_root }}/general/img/dav_logo_sektion.png%
}
\begin{textblock*}{5cm}(12cm, 2.3cm) \begin{textblock*}{5cm}(12cm, 2.3cm)
\begin{flushright} \begin{flushright}
\small \small

@ -1,4 +1,4 @@
{% load tex_extras %} {% load static common tex_extras %}
\documentclass[a4paper]{article} \documentclass[a4paper]{article}
@ -55,7 +55,10 @@
} }
\begin{document} \begin{document}
% HEADER RIGHT % HEADER RIGHT
\picpos{4.5cm}{11.5cm}{0cm}{/app/jdav_web/static/general/img/dav_logo_sektion.png} {% settings_value 'DEFAULT_STATIC_PATH' as static_root %}
\picpos{4.5cm}{11.5cm}{0cm}{%
{{ static_root }}/general/img/dav_logo_sektion.png%
}
\begin{textblock*}{5cm}(11.5cm, 2.3cm) \begin{textblock*}{5cm}(11.5cm, 2.3cm)
\begin{flushright} \begin{flushright}
\small \small

Loading…
Cancel
Save