Revision 3fc1ed9a
Découpage du module VigiGraph Enterprise
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@7074 b22e2e97-25c9-44ff-b637-2e5ceca36478
vigigraph/config/app_cfg.py | ||
---|---|---|
20 | 20 |
|
21 | 21 |
base_config = VigiloAppConfig('vigigraph') |
22 | 22 |
base_config.package = vigigraph |
23 |
|
|
24 |
# Extensions (Entreprise ou spécifique projet) |
|
25 |
base_config["extensions"] = () |
vigigraph/config/middleware.py | ||
---|---|---|
64 | 64 |
'vigilo.themes.public', 'common')) |
65 | 65 |
local_static = StaticURLParser(resource_filename( |
66 | 66 |
'vigigraph', 'public')) |
67 |
app = Cascade([app_static, common_static, local_static, app]) |
|
67 |
cascade_list = [app_static, common_static, local_static, app] |
|
68 |
|
|
69 |
LOGGER = getLogger("vigigraph") |
|
70 |
## Mise en place du répertoire d'extensions |
|
71 |
#setup_plugins_path(base_config.get("plugins_dir", |
|
72 |
# "/etc/vigilo/vigigraph/plugins")) |
|
73 |
|
|
74 |
# Spécifique projets |
|
75 |
for module in ["turbogears", "vigigraph"]: |
|
76 |
for entry in working_set.iter_entry_points( |
|
77 |
"vigilo.%s.public" % module): |
|
78 |
if (entry.name != "enterprise" and |
|
79 |
entry.name not in base_config.get("extensions", [])): |
|
80 |
# les points d'entrée "enterprise" sont automatiquement |
|
81 |
# chargés, il faut lister les autres dans la conf |
|
82 |
continue |
|
83 |
new_public_dir = resource_filename(entry.module_name, "public") |
|
84 |
LOGGER.debug("Adding static files directory for ext %s: %s", |
|
85 |
(entry.name, new_public_dir)) |
|
86 |
cascade_list.insert(0, StaticURLParser(new_public_dir)) |
|
87 |
|
|
88 |
app = Cascade(cascade_list) |
|
68 | 89 |
return app |
Also available in: Unified diff