Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add route context #2302

Merged
merged 15 commits into from Dec 21, 2021
Merged

Add route context #2302

merged 15 commits into from Dec 21, 2021

Conversation

ahopkins
Copy link
Member

@ahopkins ahopkins commented Nov 7, 2021

This PR implements the idea discussed in #2300. It is an initial PR meant to explore the concept and idea of passing value to the route context using the suggestion from @Tronic to use a ctx_ prefix in the route kwargs.

@app.route("/", ctx_foo=123)
async def handler(request: Request):

Closes #2300

sanic/mixins/routes.py Outdated Show resolved Hide resolved
@codeclimate
Copy link

codeclimate bot commented Nov 7, 2021

Code Climate has analyzed commit a08a1e4 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 82.6% (86% is the threshold).

This pull request will bring the total coverage in the repository to 86.6% (-0.1% change).

View more on Code Climate.

@ahopkins ahopkins marked this pull request as ready for review December 13, 2021 08:04
@ahopkins ahopkins requested a review from a team as a code owner December 13, 2021 08:04
@ahopkins ahopkins requested a review from Tronic December 13, 2021 09:10
@ahopkins ahopkins added the needs review the PR appears ready but requires a review label Dec 13, 2021
vltr
vltr previously approved these changes Dec 21, 2021
Copy link
Member

@vltr vltr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ahopkins ahopkins merged commit 4659069 into main Dec 21, 2021
@ahopkins ahopkins deleted the route-context branch December 21, 2021 20:56
ChihweiLHBird pushed a commit to ChihweiLHBird/sanic that referenced this pull request Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review the PR appears ready but requires a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Labeling / tagging routes
3 participants