I have a Dreamhost shared server hosting Passenger Python/Django. Currently I have a global folder (/public/static, /public/media) that collects non-python files. When I do "collectstatic" all my app's */static files get copied over to the global /public/static folder. Good so far.
1) I'm getting tired using collectstatic. I want to remove my app's */static folder and place their files in the global /public/static. This works on Dreamhost since Passenger Python points Apache's Document Root to /public, which will retrieve /public/static and /public/media correctly. But on the development side I do not have such a functionality (under python manage.py).
2) Any optimizations for static/cached files under Dreamhost/shared hosting?
Below are my settings:
Website Settings:
STATICFILES_DIRS = (
ABS_PATH + '/???/???/static/', #My App's static dir
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#'django.contrib.staticfiles.finders.DefaultStorageFinder'
)
TEMPLATE_DIRS = (
#ABS_PATH + '/hdrtoronto/hdrtoronto/templates/'
ABS_PATH + '/templates/'
)
Urls.py:
if os.environ.get("django_dev", None):
urlpatterns += static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root = settings.STATIC_ROOT)