I have following project structure:
project
|
|-templates
|-static
|
|-js
|-css
newapp
|
|-static
|
|-js
|-css
My settings.py sepcify:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static/")
Now while this works perfectly fine on development server, to make this work on deployment, I have to perform:
python manage.py collectstatic
This creates a folder called static in main project folder where manage.py resides.
My question is why there is a need to do this? Isn't there a way to serve content of those static directories in individual apps from there itself in deployment? Isnt this creating unnecessary two copies of all my static files?
Please let me know what am I missing here.
No responses yet.