首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GAE:烧瓶/webasset对{%扩展"base.html“%}有期望。

GAE:烧瓶/webasset对{%扩展"base.html“%}有期望。
EN

Stack Overflow用户
提问于 2013-06-17 14:33:32
回答 1查看 616关注 0票数 2

我正在尝试将我现有的烧瓶应用程序移植到谷歌应用程序引擎中。在大量阅读和解决问题之后,我遇到了一个我完全被困在其中的问题:

在本地环境上启动应用程序时,我会收到以下错误消息:

简写版:

代码语言:javascript
复制
{% extends "base.html" %}
OSError: [Errno 38] Function not implemented

如何才能不履行这一职能?它是烧瓶/金工2的一部分。

更长版本:

代码语言:javascript
复制
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>
ERROR    2013-06-17 14:26:42,772 app.py:1306] Exception on / [GET]
Traceback (most recent call last):
  File "/home/kave/eclipse/F11/Engineering/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/kave/eclipse/F11/Engineering/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/kave/eclipse/F11/Engineering/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/kave/eclipse/F11/Engineering/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/kave/eclipse/F11/Engineering/f11_app/views.py", line 28, in index
    return render_template('index.html')
  File "/home/kave/eclipse/F11/Engineering/flask/templating.py", line 125, in render_template
    context, ctx.app)
  File "/home/kave/eclipse/F11/Engineering/flask/templating.py", line 107, in _render
    rv = template.render(context)
  File "/home/kave/eclipse/F11/Engineering/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/kave/eclipse/F11/Engineering/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/kave/eclipse/F11/Engineering/f11_app/templates/index.html", line 1, in top-level template code
    {% extends "base.html" %}
OSError: [Errno 38] Function not implemented
INFO     2013-06-17 14:26:42,799 server.py:593] default: "GET / HTTP/1.1" 500 291

知道这可能是什么吗?非常感谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-06-17 15:09:43

这个错误出现是因为Jinja不知道模板中使用的标记assets。第二个问题是,这个项目应该在GAE上使用webasset python库运行。但是默认情况下,它不能工作,因为webassets需要输出文件夹来存储压缩的静态文件,而且它违反了GAE托管逻辑。

解决方案很简单:在上传到GAE之前,不要实时使用webassets并压缩静态文件。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17150096

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档