From edf6baa52d2113e907f774f3fe6ef7f4142ee8de Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 7 Feb 2020 17:24:52 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9api=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=9A=84token=E6=9C=89=E6=95=88=E6=9C=9F=E6=98=AF600s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/api/token.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/authentication/api/token.py b/apps/authentication/api/token.py index bea70e4b7..6c6a34aa2 100644 --- a/apps/authentication/api/token.py +++ b/apps/authentication/api/token.py @@ -23,6 +23,7 @@ class TokenCreateApi(AuthMixin, CreateAPIView): def create_session_if_need(self): if self.request.session.is_empty(): self.request.session.create() + self.request.session.set_expiry(600) def create(self, request, *args, **kwargs): self.create_session_if_need()