[Fixed]-Is there a way to Package up ALL components of an App in the same directory (including images, HTML, CSS, & JS)?


See my example project for a simple proof-of-concept.

Yes, you can add your app folder to STATICFILES_DIRS and TEMPLATE_DIRS in your project’s settings.py. You should note that your source code (views.py, models.py, etc.) will be collected and served as static files as well. This is a very unrecommended practice.

It may also be possible to write/specify a different staticfiles finder and template loader to look in your base app folders so you don’t have to specify each app in STATICFILES_DIRS and TEMPLATE_DIRS.

I feel strongly that the convention of templates and static subdirectories is the best way to go, but I’ve answered your question and I wash my hands of it.

Leave a comment