2012-05-30 30 views
1

我是新来的Django。我正在使用Google App引擎和Google CloudSQL来为django1.2项目提供服务。我一直在关注教程here,并遇到了麻烦。谷歌应用程序引擎不加载管理静态媒体文件

我启用了管理后台在我的settings.py,但是当我去http://www.examplesite.com/admin/找不到css文件。

管理HTML页面加载罚款,但静态文件给予404

这里是我的app.yml:

application: myapp 
version: 1 
runtime: python27 
api_version: 1 
threadsafe: true 

libraries: 
- name: django 
    version: "1.2" 

builtins: 
- django_wsgi: on 

我离开这些默认的settings.py:

# Absolute filesystem path to the directory that will hold user-uploaded files. 
# Example: "/home/media/media.lawrence.com/" 
MEDIA_ROOT = '' 

# URL that handles the media served from MEDIA_ROOT. Make sure to use a 
# trailing slash if there is a path component (optional in other cases). 
# Examples: "http://media.lawrence.com", "http://example.com/media/" 
MEDIA_URL = '' 

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 
# trailing slash. 
# Examples: "http://foo.com/media/", "/media/". 
ADMIN_MEDIA_PREFIX = '/media/' 

我知道这些文件位于google_appengine/lib/django_1_2/django/contrib/admin/media/

我需要将这些静态资源复制到我的项目目录中吗?或者我有一个设置错误?

回答