Task #12207 (new)
Opened 10 years ago
Last modified 10 years ago
Bug: render_response and render_response_admin fail if given an HttpResponse
Reported by: | drussell-x | Owned by: | web-team@… |
---|---|---|---|
Priority: | minor | Milestone: | Unscheduled |
Component: | Web | Version: | 5.0.1 |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description (last modified by drussell-x)
Returning an HttpResponse from the decorated function causes the decorator to bail out as it has already got a response.
This produces undesired behaviour in that (for example) none of the additional admin context is present when the template is rendered, causing it to render incorrectly.
I think that really the adding of context should be separated from the render_response decorator or I think that possibly a better way to add this context is with a template tag rather than a decorator as this can then be used only where required and doesn't have to be added to every admin function for maximum DRYness.
Change History (2)
comment:1 Changed 10 years ago by drussell-x
- Description modified (diff)
comment:2 Changed 10 years ago by jamoore
- Summary changed from render_response and render_response_admin fail if given an HttpResponse to Bug: render_response and render_response_admin fail if given an HttpResponse
prefixing with "bug" based on the description.