Answer the question
In order to leave comments, you need to log in
Why can't djnago see some of the pictures from the same folder?
Good day
, please tell me why django does not see some of the pictures from the folder, if it sees others from the same folder?
Here is the code from settings.py
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
#STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR,'static')
]
<img src='{% static 'img/sword.png' %}' width='22' height='22' alt=''>
<img src='{% static 'img/ad.png' %}' width='24' height='24' alt=''>
{% load static %}
, in the header Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question