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

Feature 645 #649

Merged
merged 9 commits into from
Mar 24, 2019
Merged

Feature 645 #649

merged 9 commits into from
Mar 24, 2019

Conversation

josephmancuso
Copy link
Member

@josephmancuso josephmancuso commented Mar 23, 2019

Closes #645

This PR allows you to get input and params by directly accessing the request class.

This can be used like so:

#== route: /dashboard/@id
def show(self, request: Request):
    user = User.find(request.id)

Instead of:

#== route: /dashboard/@id
def show(self, request: Request):
    user = User.find(request.param('id'))

This can also be used for inputs as well:

#== route: /dashboard/5?active=1
def show(self, request: Request):
    user = User.find(request.id) #== request.id = 5
    user = request.active #== request.active = 1
    user.save()

Notice how it is using both the param and the input list. Input is the first lookup followed by the params

@josephmancuso josephmancuso requested review from vaibhavmule and a team March 23, 2019 21:03
Copy link

@clsource clsource left a comment

Choose a reason for hiding this comment

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

👍

@josephmancuso josephmancuso merged commit 4136a9c into develop Mar 24, 2019
@josephmancuso josephmancuso deleted the feature-645 branch April 1, 2019 00:49
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.

3 participants