Revision 283f0810
Personnalisation fichiers statiques
Généralisation du mécanisme de personnalisation des fichiers statiques
à l'ensemble des IHMs web.
Change-Id: I1b70098ef62fef659f9f3629b5865fea4708fb4a
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/1445
Tested-by: Build system <qa@vigilo-dev.si.c-s.fr>
Reviewed-by: Thomas BURGUIERE <thomas.burguiere@c-s.fr>
vigiboard/config/middleware.py | ||
---|---|---|
54 | 54 |
""" |
55 | 55 |
app = make_base_app(global_conf, full_stack=full_stack, **app_conf) |
56 | 56 |
|
57 |
# Personalisation des fichiers statiques via /etc/vigilo/vigiboard/public/. |
|
58 |
custom_static = StaticURLParser('/etc/vigilo/vigiboard/public/') |
|
59 |
|
|
57 | 60 |
# On définit 2 middlewares pour fichiers statiques qui cherchent |
58 | 61 |
# les fichiers dans le thème actuellement chargé. |
59 | 62 |
# Le premier va les chercher dans le dossier des fichiers spécifiques |
... | ... | |
64 | 67 |
'vigilo.themes.public', 'common')) |
65 | 68 |
local_static = StaticURLParser(resource_filename( |
66 | 69 |
'vigiboard', 'public')) |
67 |
app = Cascade([app_static, common_static, local_static, app]) |
|
70 |
app = Cascade([custom_static, app_static, common_static, local_static, app])
|
|
68 | 71 |
return app |
Also available in: Unified diff