Update perm api

This commit is contained in:
ibuler
2017-11-01 23:23:11 +08:00
parent 034f0a02b1
commit 3639b190e3
4 changed files with 29 additions and 18 deletions

View File

@@ -167,7 +167,6 @@ def generate_token(request, user):
token = cache.get('%s_%s' % (user.id, remote_addr))
if not token:
token = uuid.uuid4().hex
print('Set cache: %s' % token)
cache.set(token, user.id, expiration)
cache.set('%s_%s' % (user.id, remote_addr), token, expiration)
return token