Don't use RequestContext with render_to_string

Review Request #12054 — Created Feb. 12, 2022 and submitted

Information

Review Board
release-5.0.x

Reviewers

Django no longer allows passing in a RequestContext to the
render_to_string method. For the most part we had already migrated to
passing in plain dicts, but we had several template tags that were
trying to use it with the context that they received. In this case, we
can flatten that context to get a plain dict.

Ran unit tests.

Summary ID
Don't use RequestContext with render_to_string
Django no longer allows passing in a `RequestContext` to the `render_to_string` method. For the most part we had already migrated to passing in plain dicts, but we had several template tags that were trying to use it with the context that they received. In this case, we can flatten that context to get a plain dict. Testing Done: Ran unit tests.
4fb626a59d4614a9c1e36637fb4b4187d852ba3a
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to django-3.2 (b73f908)