你可以在App Engine上使用Django 1.5的逐字标签吗? [英] Can you use the verbatim tag with Django 1.5 on App Engine?
问题描述
在我的app.yaml文件中,我有:
In my app.yaml file I have:
- name: django
version: "1.5"
我假设的意思是使用Django 1.5。 1.5包括逐字标签,但当我尝试使用它我得到:
which I assume means, use Django 1.5. 1.5 includes the verbatim tag, but when I try to use it I get:
TemplateSyntaxError: 'verbatim' is not a valid tag library: Template library verbatim not found, tried google.appengine._internal.django.templatetags.verbatim
任何想法如何启用此功能或是它只是不包括在应用程序引擎,我使用1.8.9。谢谢!
Any idea how to enable this feature or is it just not included with app engine, I am using 1.8.9. Thanks!
推荐答案
我不认为它有效。当我试图这样做,我得到这个追溯:
I don't think it works. When I tried to do this, I got this traceback:
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1535, in __call__
...
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\_internal\django\template\__init__.py", line 333, in invalid_block_tag
raise self.error(token, "Invalid block tag: '%s'" % command)
TemplateSyntaxError: Invalid block tag: 'verbatim'
查看源 C:\Program文件(x86)\Google\google_appengine\google\appengine\_internal\django\__init __。py
您可以在第一行看到版本号:
Looking at the source C:\Program Files (x86)\Google\google_appengine\google\appengine\_internal\django\__init__.py
you can see the version number in the first line:
VERSION =(1,2,5,'final',0)
这告诉我appengine正在使用Django 1.2.5版的模板G。我不知道这些是否意味着您可以将应用程序部署到生产中,并且将以某种方式使用1.5,但是我无法使其在本地工作。 (请注意,这是在我的 app.yaml
中使用Google App Engine Launcher 1.9.17指定了Django 1.5和Webapp 2.5.2)
This tells me that the appengine is using Django version 1.2.5 for the templating. I do not know if these means you can deploy the app to production and it will somehow use 1.5, but I couldn't get it to work locally. (Note that this was specifying Django 1.5 and Webapp 2.5.2 in my app.yaml
using the Google App Engine Launcher 1.9.17)
这篇关于你可以在App Engine上使用Django 1.5的逐字标签吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!