from aiohttp_session import get_session
from aiohttp import web
class LogoutView:
async def logout_get(self, req):
session = await get_session(req)
session["logged_in"] = False
return web.HTTPFound(req.app.router["home"].url_for())