HS-Sanic v19.12.0 Release Notes
Release Date: 2019-12-27 // over 4 years ago-
๐ Bugfixes
- ๐ Fix blueprint middleware application
Currently, any blueprint middleware registered, irrespective of which blueprint was used to do so, was being applied to all of the routes created by the :code:
@app
and :code:@blueprint
alike.As part of this change, the blueprint based middleware application is enforced based on where they are registered.
- If you register a middleware via :code:
@blueprint.middleware
then it will apply only to the routes defined by the blueprint. - If you register a middleware via :code:
@blueprint_group.middleware
then it will apply to all blueprint based routes that are part of the group. - If you define a middleware via :code:
@app.middleware
then it will be applied on all available routes (#37 <https://github.com/huge-success/sanic/issues/37>
__)- Fix
url_for
behavior with missing SERVER_NAME
- Fix
If the
SERVER_NAME
was missing in theapp.config
entity, theurl_for
on therequest
andapp
were failing due to anAttributeError
. This fix makes the availability ofSERVER_NAME
on ourapp.config
an optional behavior. (#1707 <https://github.com/huge-success/sanic/issues/1707>
__)๐ Improved Documentation
- ๐ Move docs from RST to MD
Moved all docs from markdown to restructured text like the rest of the docs to unify the scheme and make it easier in the future to update documentation. (
#1691 <https://github.com/huge-success/sanic/issues/1691>
__)- ๐ Fix documentation for
get
andgetlist
of therequest.args
Add additional example for showing the usage of
getlist
and fix the documentation string forrequest.args
behavior (#1704 <https://github.com/huge-success/sanic/issues/1704>
__)