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

Adding more to decorator docs #489

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jocho-here
Copy link

I wasn't able to find a way to properly use the transaction decorator when using with other decorators in the docs.
I thought it would be helpful to add this portion so others can also be aware they need to put the decorator right above the function signature without going into the code and finding out about it themselves.

```python
@router.post("/my-awesome-endpoint")
@database.transaction()
async def awesome_endpoint():
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to mention something general that "If using multiple decorators, the @database.transaction() should be the most inner to the function definition. But maybe with better wording 😄

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