访问静态文件夹中的图像

时间:2017-10-18 01:33:51

标签: python django image static

我在/ static / some_directory中放置了一些图像,Django找不到它们。但是当相同的图像放在/ static / images中时,Django能够找到它们。我的settings.py包含以下内容:

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
STATIC_URL = '/static/'

# Added to make "static" directory path relative to BASE_DIR
STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"), )

我需要添加什么才能使其正常工作?任何帮助,将不胜感激。感谢。

0 个答案:

没有答案
相关问题