Commit e0dc6a6c8ed9a5f90520c636cc3a1a9353bae597
1 parent
57470863
Exists in
master
and in
29 other branches
Removed PROXIED_APPS (replaced by COLAB_APPS)
Signed-off-by: Sergio Oliveira <sergio@tracy.com.br>
Showing
5 changed files
with
5 additions
and
10 deletions
Show diff stats
colab/plugins/gitlab/data_api.py
... | ... | @@ -18,7 +18,7 @@ LOGGER = logging.getLogger('colab.plugin.gitlab') |
18 | 18 | class GitlabDataAPI(ProxyDataAPI): |
19 | 19 | |
20 | 20 | def get_request_url(self, path, **kwargs): |
21 | - proxy_config = settings.PROXIED_APPS.get(self.app_label, {}) | |
21 | + proxy_config = settings.COLAB_APPS.get(self.app_label, {}) | |
22 | 22 | |
23 | 23 | upstream = proxy_config.get('upstream') |
24 | 24 | kwargs['private_token'] = proxy_config.get('private_token') | ... | ... |
colab/plugins/noosfero/data_api.py
... | ... | @@ -18,7 +18,7 @@ LOGGER = logging.getLogger('colab.plugin.debug') |
18 | 18 | class NoosferoDataAPI(ProxyDataAPI): |
19 | 19 | |
20 | 20 | def get_request_url(self, path, **kwargs): |
21 | - proxy_config = settings.PROXIED_APPS.get(self.app_label, {}) | |
21 | + proxy_config = settings.COLAB_APPS.get(self.app_label, {}) | |
22 | 22 | |
23 | 23 | upstream = proxy_config.get('upstream') |
24 | 24 | kwargs['private_token'] = proxy_config.get('private_token') | ... | ... |
colab/plugins/utils/views.py
... | ... | @@ -13,7 +13,7 @@ class ColabProxyView(DiazoProxyView): |
13 | 13 | |
14 | 14 | @property |
15 | 15 | def upstream(self): |
16 | - proxy_config = settings.PROXIED_APPS.get(self.app_label, {}) | |
16 | + proxy_config = settings.COLAB_APPS.get(self.app_label, {}) | |
17 | 17 | return proxy_config.get('upstream') |
18 | 18 | |
19 | 19 | @property | ... | ... |
colab/search/utils.py
... | ... | @@ -57,11 +57,10 @@ def get_collaboration_data(logged_user, filter_by_user=None): |
57 | 57 | |
58 | 58 | latest_results.extend(messages) |
59 | 59 | |
60 | - app_names = settings.PROXIED_APPS.keys() | |
60 | + app_names = settings.COLAB_APPS.keys() | |
61 | 61 | |
62 | 62 | for app_name in app_names: |
63 | - module = importlib \ | |
64 | - .import_module('colab.plugins.{}.models'.format(app_name)) | |
63 | + module = importlib.import_module('{}.models'.format(app_name)) | |
65 | 64 | |
66 | 65 | for module_item_name in dir(module): |
67 | 66 | module_item = getattr(module, module_item_name) | ... | ... |
colab/settings.py
... | ... | @@ -258,7 +258,6 @@ locals().update(conf.load_py_settings()) |
258 | 258 | locals().update(conf.load_colab_apps()) |
259 | 259 | |
260 | 260 | COLAB_APPS = locals().get('COLAB_APPS') or {} |
261 | -PROXIED_APPS = {} | |
262 | 261 | |
263 | 262 | for app_name, app in COLAB_APPS.items(): |
264 | 263 | if 'dependencies' in app: |
... | ... | @@ -269,9 +268,6 @@ for app_name, app in COLAB_APPS.items(): |
269 | 268 | if app_name not in INSTALLED_APPS: |
270 | 269 | INSTALLED_APPS += (app_name,) |
271 | 270 | |
272 | - if app.get('upstream'): | |
273 | - PROXIED_APPS[app_name.split('.')[-1]] = app | |
274 | - | |
275 | 271 | if 'middlewares' in app: |
276 | 272 | for middleware in app.get('middlewares'): |
277 | 273 | if middleware not in MIDDLEWARE_CLASSES: | ... | ... |