Commit 6011a1d0678ccfe22060f47c84462d81cf11837e
1 parent
b9a2e969
Exists in
master
and in
34 other branches
Remove django dependency from settings
Signed-off-by: Gustavo Jaruga <darksshades@gmail.com> Signed-off-by: Carolina Ramalho <carol15022@hotmail.com> Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Showing
1 changed file
with
4 additions
and
14 deletions
Show diff stats
colab/settings.py
... | ... | @@ -293,6 +293,7 @@ BROWSERID_ENABLED = locals().get('BROWSERID_ENABLED') or False |
293 | 293 | SOCIAL_NETWORK_ENABLED = locals().get('SOCIAL_NETWORK_ENABLED') or False |
294 | 294 | |
295 | 295 | COLAB_APPS = locals().get('COLAB_APPS') or {} |
296 | +PROXIED_APPS = {} | |
296 | 297 | |
297 | 298 | for app_name, app in COLAB_APPS.items(): |
298 | 299 | if 'dependencies' in app: |
... | ... | @@ -303,6 +304,9 @@ for app_name, app in COLAB_APPS.items(): |
303 | 304 | if app_name not in INSTALLED_APPS: |
304 | 305 | INSTALLED_APPS += (app_name,) |
305 | 306 | |
307 | + if app.get('upstream'): | |
308 | + PROXIED_APPS[app_name.split('.')[-1]] = app | |
309 | + | |
306 | 310 | if not app or 'templates' not in app: |
307 | 311 | continue |
308 | 312 | |
... | ... | @@ -327,17 +331,3 @@ try: |
327 | 331 | except ImportError: |
328 | 332 | pass |
329 | 333 | |
330 | -from django.apps import apps | |
331 | -import django | |
332 | -django.setup() | |
333 | - | |
334 | -PROXIED_APPS = {} | |
335 | - | |
336 | -for app_name in COLAB_APPS: | |
337 | - try: | |
338 | - config = apps.get_app_config(app_name.split('.')[-1]) | |
339 | - except: | |
340 | - config = None | |
341 | - | |
342 | - if config and getattr(config, 'colab_proxied_app', False): | |
343 | - PROXIED_APPS[app_name.split('.')[-1]] = COLAB_APPS[app_name] | ... | ... |