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

added is_named_route method #207

Merged
merged 3 commits into from
Jul 1, 2018
Merged

added is_named_route method #207

merged 3 commits into from
Jul 1, 2018

Conversation

josephmancuso
Copy link
Member

This adds a request.is_named_route() method that can be used like this:

# Request: /dashboard/user/edit/1
# Named: dashboard.edit
# Route url looks like: /dashboard/user/edit/@id

def show(self, request: Request):
    request.is_named_route('dashboard.edit', {'id': 1})

This method looks at the current path with the params passed and determines if it is a named route

@josephmancuso josephmancuso self-assigned this Jun 30, 2018
@josephmancuso josephmancuso added the next minor Issue scheduled for the next minor release label Jun 30, 2018
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 91.089% when pulling 9fdd976 on add-is-named-route into e845591 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 91.089% when pulling 9fdd976 on add-is-named-route into e845591 on master.

@coveralls
Copy link

coveralls commented Jun 30, 2018

Coverage Status

Coverage decreased (-0.04%) to 91.256% when pulling 8747843 on add-is-named-route into f7ca044 on master.

@josephmancuso josephmancuso added the enhancement New feature or request label Jun 30, 2018
@josephmancuso josephmancuso merged commit 32d22ff into master Jul 1, 2018
@josephmancuso josephmancuso deleted the add-is-named-route branch July 11, 2018 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next minor Issue scheduled for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants