ブートストラップがDjangoアプリに設定されていません.Googleコンソールで、リソースの読み込みに失敗しました:サーバが404のステータス(not found)で応答しましたbootflat.min.cssエラーが発生します。私は、ブートストラップは私のジャンゴapp.I実行コマンドのpython manage.py collectstaticが、エラーなしに設定されていない理由を私は知らない ブートストラップがDjangoアプリに設定されていません
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
}
}
PythonServer_nginx.conf
にsettings.pyBASE_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'), ]
に書きました私はこれをどのように修正すべきですか?私はそれを何に書きますか?
なぜあなたは 'STATICFILES_DIRS'にディレクトリとして設定されることになっているURLにURLを追加していますか? –