如题所述
设置ä¸ä¸ªè·¯å¾åé
APP_PATH=os.path.dirname(os.path.dirname(__file__))
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# 注æè¦ä¿®æ¹STATIC_ROOTåé
STATIC_ROOT = os.path.join(APP_PATH,'static').replace('\\','/')
# URL prefix for static files.
# Example: ample.com/static/", "h ic.example.com/"
STATIC_URL = '/static/'
# å½ç¶è¿æSTATICFILES_DIRSåé
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(APP_PATH,'mobile_oa_server/static').replace('\\','/'),
)
APP_PATH=os.path.dirname(os.path.dirname(__file__))
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# 注æè¦ä¿®æ¹STATIC_ROOTåé
STATIC_ROOT = os.path.join(APP_PATH,'static').replace('\\','/')
# URL prefix for static files.
# Example: ample.com/static/", "h ic.example.com/"
STATIC_URL = '/static/'
# å½ç¶è¿æSTATICFILES_DIRSåé
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(APP_PATH,'mobile_oa_server/static').replace('\\','/'),
)
温馨提示:答案为网友推荐,仅供参考