Opened 9 years ago
Closed 9 years ago
#12095 closed enhancement (fixed)
Add is_xhr property to Request class
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | low | Milestone: | 1.1.6 |
Component: | web frontend | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: |
Added |
||
Internal Changes: |
Description
Adding an is_xhr
method to Request
would allow several instances of the following statement to be replaced:
req.get_header('X-Requested-With') == 'XMLHttpRequest
Attachments (0)
Change History (7)
comment:1 by , 9 years ago
API Changes: | modified (diff) |
---|---|
Status: | new → assigned |
Type: | defect → enhancement |
follow-up: 4 comment:3 by , 9 years ago
Replying to rjollos:
Revised changes in log:rjollos.git:t12095-is-xhr.1.
Adding Request.is_xhr
property is good idea and the proposed changes look good to me.
comment:4 by , 9 years ago
Replying to jomae:
Adding
Request.is_xhr
property is good idea and the proposed changes look good to me.
Seconded, it's something I wanted to do myself "back in the time" ;-)
comment:5 by , 9 years ago
Thanks for the review. I added a few more changes in [3dcd619abd/rjollos.git], based on Request
being available when rendering the template and _display_html
being an internal method that we can modify the signature for without breaking API compatibility. Tests are passing for me, but I haven't done much manual testing yet. I'll test more before committing.
comment:6 by , 9 years ago
Priority: | normal → low |
---|
comment:7 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed to trunk in [14099].
Proposed changes in log:rjollos.git:t12095-is-xhr.
Edit: I'm seeing functional test failures. I'll post revised changes shortly.