0
私はフラスコ-編集パッケージ(https://github.com/nathancahill/Flask-Edits)フラスコ-編集:はAttributeError:「TokenStream」オブジェクトが属性を持っていない「次へ」
をテストしようとしている誰もがこのエラーを支援することができます:はAttributeError:「TokenStream」オブジェクトが持っています無属性 '次へ'
@app.route('/')
def hello_world():
return render_template('test.html')
if __name__ == '__main__':
app.run(debug=True)
テンプレート:
<!DOCTYPE html>
<html>
<head>
<title>Haldane</title>
</head>
<body>
<p>Test</p>
{% editable 'Section name' %}
Python is a programming language that lets you work quickly and integrate systems more effectively.
{% endeditable %}
</body>
</html>
エラーがここに発生しません:
"""Jinja extensions to mark sections as editable
"""
import hashlib
from collections import OrderedDict
from jinja2.nodes import Output, Template, TemplateData
from jinja2.ext import Extension
class EditableExtension(Extension):
tags = set(['editable'])
def parse(self, parser):
_db = self.environment.edits
# Skip begining node
parser.stream.next()
エラー:コードを含む
File "/anaconda/lib/python3.5/site-packages/flask_edits/editable.py", line 18, in parse
parser.stream.next()
AttributeError: 'TokenStream' object has no attribute 'next'
要旨: https://gist.github.com/archienorman11/98993d66fc30283ba113f8a4f2b39669