は追求するために1.3回の試行をジャンゴは、Djangoの静的な構造
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = BASE_PATH+'/static/'
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
# URL prefix for admin static files -- CSS, JavaScript and images.
# Make sure to use a trailing slash.
# Examples: "http://foo.com/static/admin/", "/static/admin/".
ADMIN_MEDIA_PREFIX = '/static/admin/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
私はmanage.pyコマンドcollectstaticを使用している場合、それはコレ:私は以下のように行ったsettings.pyでこれらの設定を設定する必要があり(BasePath変数は、現在のディレクトリへのショートカットのパスです) (メインプロジェクトディレクトリ内の)「静的」ディレクトリにすべての静的ファイル(adminファイルを含む)を置き換えます。
しかし、STATICFILES_DIRSタプルにそのディレクトリを追加するまでは、しかし、私はSTATIC_ROOTディレクトリ設定を変更する必要があります。それ以外の場合は、同じエラーになることはありません。
私はそれを機能させるために何をしなければならないと思っていますか?
だから、あなたのファイルが実際に格納されているディレクトリを 'STATIC_DIRS'に置き、' STATIC_ROOT'を__empty directory__にポイントしましたか?Djangoは静的ファイルを収集できますか? – agf