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 helper #203

Merged
merged 2 commits into from
Jun 30, 2018
Merged

Add route helper #203

merged 2 commits into from
Jun 30, 2018

Conversation

josephmancuso
Copy link
Member

@josephmancuso josephmancuso commented Jun 29, 2018

Closes #199


If we have a route list like this:

ROUTES = [
    get('/url/to/dashboard' ..).name('dashboard'),
    get('/profile/user/@id:int/edit').name('profile.edit')
]

We can now use:

def show(self):
    request().route('profile.edit', {'id': 1})

or use the new helper function this comes with:

def show(self):
    route('profile.edit', {'id': 1})

@josephmancuso josephmancuso self-assigned this Jun 29, 2018
@coveralls
Copy link

coveralls commented Jun 29, 2018

Coverage Status

Coverage decreased (-0.07%) to 91.125% when pulling bf948a3 on add-route-helper into fa3d82a on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.07%) to 91.125% when pulling bf948a3 on add-route-helper into fa3d82a on master.

@josephmancuso josephmancuso merged commit e845591 into master Jun 30, 2018
@josephmancuso josephmancuso mentioned this pull request Jun 30, 2018
7 tasks
@josephmancuso josephmancuso deleted the add-route-helper branch June 30, 2018 19:24
@clsource clsource mentioned this pull request Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants