diff --git a/hshassets/utils.py b/hshassets/utils.py index aa0d1644613ecb562d9231640eab5628f25409b3..18cf4114e9925d42d5ae6b2a1e4f59bcfeb53e81 100644 --- a/hshassets/utils.py +++ b/hshassets/utils.py @@ -16,6 +16,7 @@ def get_asset_directories(): """get every app path that contains an "asset" folder on its root""" asset_apps = {} + all_apps = {} for app_name in settings.INSTALLED_APPS: app_module = import_module(app_name) @@ -31,8 +32,17 @@ def get_asset_directories(): } }) + all_apps.update({ + app_name: { + 'app_path': app_path, + 'static_base_path': app_path + '/static/', + 'static_path': app_path + '/static/' + app_name, + 'asset_path': app_path + '/assets' + } + }) + for source_app, target_app in STATIC_TARGET_APPS.items(): - asset_apps[source_app]['static_path'] = asset_apps[target_app]['static_base_path'] + source_app + asset_apps[source_app]['static_path'] = all_apps[target_app]['static_base_path'] + source_app return asset_apps