答案 0 :(得分:1)
感谢大家的快速回复,我刚刚用以下方法解决了这个问题:
环境:Apache和WSGI
/etc/apache2/sites-enabled/000-default
Alias /static/ /path/to/mysite.com/static/ <Directory /path/to/mysite.com/static> Require all granted </Directory>
settings.py
STATIC_ROOT = BASE_DIR + '/static' STATIC_URL = '/static/'
python manage.py collectstatic
并重新启动Apache