2013-02-25 29 views
0

當運行命令collectstatic我收到以下錯誤:Django的collectstatic給ValueError異常:需要超過1的值來解壓

ValueError異常:需要比1點的值更解壓

這已經開始發生因爲我將下面的行添加到我的靜態查找器中。誰能幫忙?我需要找到常用的文件夾。

settings.py

# Used to provide absolute paths. Normally the default is fine. 
LOCAL_PATH = normpath(join(dirname(__file__), '..')) 

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder', 
    'django.contrib.staticfiles.finders.AppDirectoriesFinder', 
    LOCAL_PATH + '/public/common/', 
) 

回答

3

您使用了錯誤的設置。

你想在STATICFILES_DIRS中做你正在做的事情。

STATICFILES_FINDERS指定將搜索文件的python模塊。 STATICFILES_DIRS指定django.contrib.staticfiles.finders.FileSystemFinder應該看哪些路徑在

這樣:

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder', 
    'django.contrib.staticfiles.finders.AppDirectoriesFinder', 
) 

STATICFILES_DIRS = ('%s/public/common/' % LOCAL_PATH,) 
+0

很大的幫助的感謝,還在學習繩索:) – jason 2013-02-25 11:19:41

+0

的設置Django的種種困惑甚至退伍軍人;) – 2013-02-25 11:24:52

相關問題