cannot use current_user in jinja2 macro?

前端 未结 3 1617
梦毁少年i
梦毁少年i 2021-02-13 23:06

I use Flask-Login which provides the current_user object in templates. I want to write a macro to show a comment form or a log in link depending on if the user is l

3条回答
  •  醉话见心
    2021-02-14 00:10

    The current_user.is_authenticated is now accessed as a property and calling the method definition will lead to problems with more up-to-date library versions.

    See: https://flask-login.readthedocs.org/en/latest/#flask.ext.login.current_user

提交回复
热议问题