Open
Description
Request
If callback_func
in hosts(callback=callback_func)
returns None
, then it continues checking the host_patterns
.
This allows callback_func
to act as part of the pattern-matching constraint.
Why
- If there are no matches, automatically returns 404 instead of requiring manual handling inside the
callback
.- Currently, the
callback
has to manually return aHttpResponse()
asNone
will continue the request.
- Currently, the
- Allows for DB based pattern matching.
- Complex apps/lots of routes can have stronger sub-grouping.
Possible Alternatives
- Add a
constraint_func
tohosts()
instead.
Next Steps
I'm happy to work on it, but wanted feedback first since it should be considered a breaking change.
Metadata
Metadata
Assignees
Labels
No labels