-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
callbackhas to manually return aHttpResponse()asNonewill 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_functohosts()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