Flash messages mechanism, closes #790

This commit is contained in:
Simon Willison 2020-06-02 14:08:12 -07:00
commit 4fa7cf6853
14 changed files with 217 additions and 7 deletions

View file

@ -180,9 +180,9 @@ class AsgiLifespan:
class AsgiView:
def dispatch_request(self, request, *args, **kwargs):
async def dispatch_request(self, request, *args, **kwargs):
handler = getattr(self, request.method.lower(), None)
return handler(request, *args, **kwargs)
return await handler(request, *args, **kwargs)
@classmethod
def as_asgi(cls, *class_args, **class_kwargs):