[Fixed]-Trouble adding Django-Assets / Webassets directory to look for assets.py files

1👍

Couple of quick notes, for ASSETS_MODULES, the key word is additional:

django-assets will automatically look for assets.py files in each application, where you can register your bundles. If you want additional modules to be loaded, you can define this setting. It expects a list of importable modules:

i.e., we only use ASSETS_MODULES if we have assets.py files outside of any application. In your case, we will only specify this if project_dir is not an INSTALLED_APP.

Second, when using ASSETS_MODULES, you specify a dotted module path, not a directory. In your case, this would be project_dir.assets only if project_dir is not already part of INSTALLED_APPS.

👤2ps

Leave a comment