以前は正常に機能していましたが、何が変わったのかわかりませんが、静的ファイルの読み込みでエラーが発生します=(助けてください!
Django1.4の使用
Urls.py
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns += staticfiles_urlpatterns()
Settings.py
STATIC_ROOT = '/root/abc/abc_app/sitestatic'
# URL prefix for static files.
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
'/root/abc/static/',
'/Users/blahusername/djangoproj/abc/static/',
)
Header.html
<script type="text/javascript" src="/static/js/jquery-1.7.1.min.js"></script>
ブラウザのエラー:
GET file://localhost/static/js/jquery-1.7.1.min.js
Unsafe JavaScript attempt to access frame with URL file://localhost/Users/blahusername/djangoproj/abc/abc_app/templates/index.html from frame with URL http://www.youtube.com/embed/yyy. Domains, protocols and ports must match.