如何使用静态文件与django nonrel [英] How to use static files with django nonrel
问题描述
- url:/ static
static_dir:static
我无法到达我的静态文件。我必须做额外的配置吗?
提前Thx。
p> app.yaml
与Django无关,但它配置了App Engine前端。答案取决于您是否要使用Django或前端提供静态文件(这是更好,更便宜和更快)。
如果您只是添加您的 - url:/ static
映射到最后,在之前移动 /.* 通配符由于所有映射从上到下处理 - 首先匹配映射获胜。
I'm trying to use the Django nonrel project for google app engine. I setup the test project as described here. I added a new folder to the project named "static" for my static files. And for the app.yaml file i added the lines;
- url: /static
static_dir: static
I can't reach my static files. Do i have to do additional configuration?
Thx in advance.
app.yaml
have nothing to do with Django, but it does configures App Engine front-end. The answer depends on whether you want to serve static files with Django or the front-end (which is, well, cheaper and faster).
If you just "added" your - url: /static
mapping to the end, move it before the /.*
wildcard. As all mappings processed from top to bottom — first matching mapping wins.
这篇关于如何使用静态文件与django nonrel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!