summaryrefslogtreecommitdiff
path: root/service/pixelated/resources/logout_resource.py
blob: 9fd164513078fe6232c3151453c6df7efd2955bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pixelated.resources import BaseResource
from twisted.web import util

from pixelated.resources.login_resource import LoginResource


class LogoutResource(BaseResource):
    BASE_URL = "logout"
    isLeaf = True

    def render_GET(self, request):
        session = self.get_session(request)
        session.expire()
        return util.redirectTo("/%s" % LoginResource.BASE_URL, request)