1
It depends. Since my apps share the same set of static and templates I store them in root dirs:
# Settings
STATIC_URL = '/static/'
STATIC_ROOT = abspath('static')
STATICFILES_DIRS = (abspath('styles'),)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
...
)
TEMPLATE_DIRS = (abspath('templates'),)
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
# All styles are in one place
βββ styles
β βββ less
β βββ js
# App's templates are stored in privite dirs so I can move them in app dir any time
# without changing my code: flatpages/flatpage_detail.html Also it works well with
# class based views.
βββ templates
β βββ base.html
β βββ flaptages/
β β βββ flatpage_detail.html
β βββ another_app/
β β βββ another_app_detail.html
Then I do manage.py collecstatic
and have all static in root/static
dir.
It fits me. But if I would make an app to share with community I will put static and templates in itβs own dir as described in docs.
Source:stackexchange.com