Project

General

Profile

Revision 5f2cd70a

ID5f2cd70a67dff4e8a540beb5ad335c9acce78363
Parent 20422a70
Child 6f56e540

Added by Francois POIROTTE over 14 years ago

Utilisation des templates et des fichiers statiques du thème.
Ajout d'une dépendance vers vigilo-themes-default à cet effet.

git-svn-id: https://vigilo-dev.si.c-s.fr/svn@853 b22e2e97-25c9-44ff-b637-2e5ceca36478

View differences:

vigiboard/config/middleware.py
5 5
from vigiboard.config.app_cfg import base_config
6 6
from vigiboard.config.environment import load_environment
7 7

  
8
from pkg_resources import resource_filename
9
from paste.cascade import Cascade
10
from paste.urlparser import StaticURLParser
11

  
8 12
__all__ = ['make_app']
9 13

  
10 14
# Use base_config to setup the necessary PasteDeploy application factory. 
......
30 34
    @return: The vigiboard application with all the relevant middleware
31 35
        loaded.
32 36
    """
33
    app = make_base_app(global_conf, full_stack=True, **app_conf)
34

  
35
    # Wrap your base TurboGears 2 application with custom middleware here
37
    app = make_base_app(global_conf, full_stack=full_stack, **app_conf)
38

  
39
    # On définit 2 middlewares pour fichiers statiques qui cherchent
40
    # les fichiers dans le thème actuellement chargé.
41
    # Le premier va les chercher dans le dossier des fichiers spécifiques
42
    # à l'application, le second cherche dans les fichiers communs.
43
    app_static = StaticURLParser(resource_filename(
44
        'vigilo.themes.public', 'vigiboard'))
45
    common_static = StaticURLParser(resource_filename(
46
        'vigilo.themes.public', 'common'))
47
    app = Cascade([app_static, common_static, app])
36 48

  
37 49
    return app
38 50

  

Also available in: Unified diff