Answer the question
In order to leave comments, you need to log in
How to make common static for all django apps?
I'm making a test site with django. The files are on the laptop's hard drive. There are 2 applications at the root of the project - a blog and polls and a mysite folder with settings. I want that for all applications there was a general statics. I throw static files into the static folder at the root, set the path to it in STATICFILES_DIRS in setting.py, but when I go, for example, to localhost:8000/blog/, I see in the console that the statics are loaded at localhost:8000/blog/ ...
How to make it look for statics not in the application, but in the root of the project?
Answer the question
In order to leave comments, you need to log in
In the project folder, create the /static folder
In the settings.py file, add
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
How to make it look for statics not in the application, but in the root of the project?
preg_match('/value=\"([^\"]+)\"/', %строка% ,$match);
print_r($match[1]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question