【发布时间】:2016-02-24 10:06:03
【问题描述】:
我试过了,我无法按照官方文件进行设置... 我在这里附上IMG,请给我建议,问题出在哪里。enter image description here
或者,用字典树结构给我简单的步骤。
谢谢。
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static_root', 'static')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
# '/var/www/static/',
)
【问题讨论】:
-
您的 STATIC_ROOT 值存在问题,您不应添加单引号,因为 os.path.join 是一个函数
-
你为什么一直发截图?您的代码是 text,请在此处发布。
-
很抱歉,我在上面发布了代码。 @丹尼尔·罗斯曼
标签: python django static django-staticfiles django-1.8