부트 스트랩이 내 장고 앱으로 설정되지 않았습니다. Google 콘솔에서 리소스를로드하지 못했습니다 : 서버가 404 (찾을 수 없음) bootflat.min.css 오류로 응답했습니다. 나는 부트 스트랩이 장고 앱으로 설정되지 않음
server {
# the port your site will be served on
listen 8000;
# the domain name it will serve for
server_name MyServerIPAdress; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
location /static {
alias /home/ubuntu/PythonServer/PythonServer/accounts/static; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location/{
uwsgi_pass django;
include /home/ubuntu/PythonServer/uwsgi_params; # the uwsgi_params file you installed
}
}
내가 부트 스트랩이 내 장고 app.I 실행 명령 파이썬 manage.py의 collectstatic하지만 오류로 설정하지 않는 이유를 모르는
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG =True
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static/")
STATICFILES_DIRS = [os.path.join(BASE_DIR,'bootflat.github.io'), ]
PythonServer_nginx.conf
에 settings.py에 썼다 어떻게해야합니까? 내가 써야 할게 뭐야?
왜 'STATICFILES_DIRS'에서 dir으로 설정 될 URL에 URL을 추가하고 있습니까? –