首先找到apache2的conf文件下的httpd.conf,添加如下信息:

Alias /static/ E:/wamp/Apache24/www/static/
<Directory E:/wamp/Apache24/www/static> 
    Options FollowSymlinks
    AllowOverride none
    Require all granted
</Directory>

django 工程下setting中对应设置:

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

STATIC_URL = '/static/'
STATICFILES_DIRS = (
     os.path.join(BASE_DIR, "static"),
)

相关文章:

  • 2022-12-23
  • 2021-11-19
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2021-10-09
  • 2021-11-19
猜你喜欢
  • 2022-12-23
  • 2021-11-13
  • 2021-11-19
  • 2021-11-19
  • 2021-10-19
  • 2021-11-19
相关资源
相似解决方案