0
所以我決定部署我的第一個appjog應用程序,在appfog中創建應用程序,下載源代碼以便使用他們的項目結構,進行必要的更改和更新。它一切順利,直到我做了python manage.py collectstatic
這收集了所有的靜態文件,但我無法對靜態文件進行更改,無法在模板中使用css。我只是不明白爲什麼。 在我的settings.py爲什麼我不能編輯css文件並在django模板中使用css?
ROOT_PATH = os.path.dirname(__file__)
STATIC_ROOT = os.path.join(ROOT_PATH, 'static')
STATIC_DIR = /absolute/path/to/static
在urls.py
url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
我的項目結構看起來像這樣,基本結構與appfog
-env
-.afignore
-settings.py
-templates
-static
-app1
如何解決這個問題?
嘿@catherine,我沒有得到你的意思..我感到困惑的聲明..'' – 2013-03-28 07:37:56
現在我明白了...但它是聰明的與django文件搞砸,因爲staticfiles是一個django目錄的權利。 – 2013-03-28 07:53:39
好吧,讓我們試試看吧 – 2013-03-28 08:02:39