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
The context a template is rendered in is not passed to imports unless instructed to do so. See the relevant docs.
You're right, you don't need to inject context as arguments to macros. You can import the macros with context
and they will have access the the context of the template they're imported in.
{% from "macros/comments.html" import comment_form with context %}