jinja2.exceptions.TemplateSyntaxError

来源:5-7 .电影详情页面搭建

GoogleSmile

2017-09-20

jinja2.exceptions.TemplateSyntaxError

jinja2.exceptions.TemplateSyntaxError: expected token ',', got '='

所有页面图片什么的都不显示,首页出现这个http://127.0.0.1:5000/

写回答

4回答

GoogleSmile

提问者

2017-09-20

http://127.0.0.1:5000/moviecol/

//szimg.mukewang.com/59c215190001e9cb10760761.jpg

0
0

GoogleSmile

提问者

2017-09-20

http://127.0.0.1:5000/play/

//szimg.mukewang.com/59c214f300019c8b10020581.jpg

0
0

GoogleSmile

提问者

2017-09-20

Traceback (most recent call last):

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\app.py", line 1997, in __call__

    return self.wsgi_app(environ, start_response)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\app.py", line 1985, in wsgi_app

    response = self.handle_exception(e)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\app.py", line 1540, in handle_exception

    reraise(exc_type, exc_value, tb)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\_compat.py", line 33, in reraise

    raise value

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\app.py", line 1982, in wsgi_app

    response = self.full_dispatch_request()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\app.py", line 1614, in full_dispatch_request

    rv = self.handle_user_exception(e)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\app.py", line 1517, in handle_user_exception

    reraise(exc_type, exc_value, tb)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\_compat.py", line 33, in reraise

    raise value

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request

    rv = self.dispatch_request()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\app.py", line 1598, in dispatch_request

    return self.view_functions[rule.endpoint](**req.view_args)

  File "D:\PycharmProjects\movie_project\app\home\views.py", line 47, in animation

    return render_template("home/animation.html")

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\flask\templating.py", line 133, in render_template

    return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\environment.py", line 869, in get_or_select_template

    return self.get_template(template_name_or_list, parent, globals)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\environment.py", line 830, in get_template

    return self._load_template(name, self.make_globals(globals))

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\environment.py", line 804, in _load_template

    template = self.loader.load(self, name, globals)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\loaders.py", line 125, in load

    code = environment.compile(source, name, filename)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\environment.py", line 591, in compile

    self.handle_exception(exc_info, source_hint=source_hint)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\environment.py", line 780, in handle_exception

    reraise(exc_type, exc_value, tb)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\_compat.py", line 37, in reraise

    raise value.with_traceback(tb)

  File "D:\PycharmProjects\movie_project\app\templates\home\animation.html", line 6, in template

    <link rel="stylesheet" type="text/css" href="{{ url_for('static'.filename='anim/css/style.css')}}">

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\environment.py", line 497, in _parse

    return Parser(self, source, name, encode_filename(filename)).parse()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 896, in parse

    result = nodes.Template(self.subparse(), lineno=1)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 870, in subparse

    add_data(self.parse_tuple(with_condexpr=True))

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 615, in parse_tuple

    args.append(parse())

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 427, in parse_expression

    return self.parse_condexpr()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 432, in parse_condexpr

    expr1 = self.parse_or()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 445, in parse_or

    left = self.parse_and()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 454, in parse_and

    left = self.parse_not()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 465, in parse_not

    return self.parse_compare()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 469, in parse_compare

    expr = self.parse_math1()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 491, in parse_math1

    left = self.parse_concat()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 502, in parse_concat

    args = [self.parse_math2()]

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 512, in parse_math2

    left = self.parse_pow()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 523, in parse_pow

    left = self.parse_unary()

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 542, in parse_unary

    node = self.parse_postfix(node)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 671, in parse_postfix

    node = self.parse_call(node)

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\parser.py", line 762, in parse_call

    self.stream.expect('comma')

  File "D:\ProgramData\Anaconda2\envs\py36\lib\site-packages\jinja2\lexer.py", line 386, in expect

    self.name, self.filename)

jinja2.exceptions.TemplateSyntaxError: expected token ',', got '='


0
0

GoogleSmile

提问者

2017-09-20

我的首页界面就是这 所有的界面什么都不显示

//szimg.mukewang.com/59c2135d0001b6d014640739.jpg

0
0

Python Flask 构建微电影视频网站

Python 最好用轻量级框架,让你轻松胜任 Python Web 工程师

683 学习 · 663 问题

查看课程