Changes between Initial Version and Version 1 of Ticket #18105, comment 5


Ignore:
Timestamp:
Dec 22, 2016, 9:40:08 AM (7 years ago)
Author:
Tim Graham

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18105, comment 5

    initial v1  
    1 [73317883] changed `render_to_response` so it wouldn't rewrap a `Context` inadvertently passed in the `dictionary` argument in another `Context`. That's the opposite of the route taken by first patch above and I'm convinced it's a better approach given how widespread `render_to_response` is and how easy forgetting `context_instance=` is.
     1733178830072caeca3c054a220808b4c557faec4 changed `render_to_response` so it wouldn't rewrap a `Context` inadvertently passed in the `dictionary` argument in another `Context`. That's the opposite of the route taken by first patch above and I'm convinced it's a better approach given how widespread `render_to_response` is and how easy forgetting `context_instance=` is.
    22
    33The second patch still warrants consideration. I had a look and I don't think the code inside `if isinstance(_dict, BaseContext)` is correct: it adds values such as `autoescape` and `current_app` to the context when they're intended to be attributes of the context object.
Back to Top