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

aiohttp template decorator not working when a handler function is used. #2

Closed
joente opened this issue Sep 21, 2016 · 2 comments
Closed
Assignees
Labels

Comments

@joente
Copy link
Member

joente commented Sep 21, 2016

The current template decorator need a handler to be written from a class.

example:

class Handlers:

    @template('base.template')
    async def myhandler(self, request):
       return {'name': 'Test'}

but the following does not work:

@template('base.template')
async def myhandler(self, request):
   return {'name': 'Test'}
@joente joente added the bug label Sep 21, 2016
@joente joente self-assigned this Sep 21, 2016
@joente
Copy link
Member Author

joente commented Sep 21, 2016

The arguments self and request were hard coded and are now replaced with *args

@joente joente closed this as completed Sep 21, 2016
joente pushed a commit that referenced this issue Sep 21, 2016
@joente
Copy link
Member Author

joente commented Sep 21, 2016

Created version 1.0.5 containing the bug fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant