Set `HttpRequest.resolver_match` to `None` by default
|Reported by:||coolRR||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Sometimes my app has to deal with a request which does not have a
.resolver_match object for some reason.
In these cases, I suggest that
.resolver_match will have a value of
None rather than not existing. This makes for much more elegant testing whether it exists or not.
Trivial patch attached.
Change History (4)
comment:1 Changed 4 years ago by
|Component:||Uncategorized → HTTP handling|
|Patch needs improvement:||unset|
|Type:||Uncategorized → Cleanup/optimization|
|Version:||1.5 → master|