Skip to content

Conversation

@Yourun-proger
Copy link
Contributor

@Yourun-proger Yourun-proger commented Jul 13, 2022

When trying to use the render_template and render_template_string functions outside of the context of an application, a silly None error occurs that does not tell the user that this function only works when there is a flask application. I just fixed it.
I decided not to create a problem report about this, because this seems to be a fairly simple and small matter. Plus it's just like #4333 , which I've already fixed. Sorry, if this is still necessary, I will immediately create this message so that everything goes "by the rules".

Checklist:

  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

@Yourun-proger
Copy link
Contributor Author

ah, give me a second, i'll fix docs

@davidism
Copy link
Member

This is no longer needed, it's completely refactored in 2.2.

@Yourun-proger
Copy link
Contributor Author

close?

@davidism davidism closed this Jul 13, 2022
@davidism davidism reopened this Jul 13, 2022
@davidism
Copy link
Member

Eh, it can go in, I was about to release 2.1.3 anyway.

@davidism davidism added this to the 2.1.3 milestone Jul 13, 2022
@Yourun-proger
Copy link
Contributor Author

I hope you understand that I respect your opinion, so do as you see fit.

@davidism davidism changed the title Add error message error message for render_template outside app context Jul 13, 2022
@davidism davidism merged commit a7859c6 into pallets:2.1.x Jul 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants