home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 973564260

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/878#issuecomment-973564260 https://api.github.com/repos/simonw/datasette/issues/878 973564260 IC_kwDOBm6k_c46B2lk 9599 2021-11-19T00:27:06Z 2021-11-19T00:27:06Z OWNER Problem: the fancy `asyncinject` stuff inteferes with the fancy Datasette thing that introspects view functions to look for what parameters they take: ```python class Table(asyncinject.AsyncInjectAll): async def view(self, request): return Response.html("Hello from {}".format( html.escape(repr(request.url_vars)) )) @hookimpl def register_routes(): return [ (r"/t/(?P<db_name>[^/]+)/(?P<table_and_format>[^/]+?$)", Table().view), ] ``` This failed with error: "Table.view() takes 1 positional argument but 2 were given" So I'm going to use `AsyncInject` and have the `view` function NOT use the `@inject` decorator. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 648435885  
Powered by Datasette · Queries took 0.906ms