2👍
✅
You are doing it wrong, see the docs: https://docs.djangoproject.com/en/1.8/howto/static-files/
this is correct way to locate static files:
{% static "my_app/myexample.jpg" %}
But anyway, you have a misconfigured paths:
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
0👍
You have to make sure the static files get served too.
During development the easiest way is put django.contrib.staticfiles
in INSTALLED_APPS
then the runserver
command will automatically serve your static files. Follow the docs for other methods, and a pointer to the collectstatic
command you use for deployment in production.
- [Answered ]-Docker: How to rely on a local db rather than a db docker container?
- [Answered ]-Django. Override the html format of a FileField field in the change page via ModelAdmin
Source:stackexchange.com