Answer the question
In order to leave comments, you need to log in
Why Django pulls admin statics from something other than STATIC_ROOT?
Good afternoon.
Decided to customize CSS admin.
The static is collected in STATIC_ROOT, including admin-ki. I also made some changes to the CSS.
But in fact, the admin panel uses statics from the Python34 directory. Customized templates from templates work fine.
Settings:
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
STATICFILES_DIRS = [os.path.join(ROOT_DIR, 'static/'), ]
Answer the question
In order to leave comments, you need to log in
Because static is also collected from the application layer:
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question