Don't use from etiquette import.

This commit is contained in:
voussoir 2018-01-13 16:12:52 -08:00
parent d84fc037fe
commit 57f007d595

View file

@ -4,7 +4,7 @@ import math
import os import os
import werkzeug.wrappers import werkzeug.wrappers
from etiquette import helpers import etiquette
def _generate_token(length=32): def _generate_token(length=32):
randbytes = os.urandom(math.ceil(length / 2)) randbytes = os.urandom(math.ceil(length / 2))
@ -77,7 +77,7 @@ class Session:
self.user = user self.user = user
self.ip_address = request.remote_addr self.ip_address = request.remote_addr
self.user_agent = request.headers.get('User-Agent', '') self.user_agent = request.headers.get('User-Agent', '')
self.last_activity = int(helpers.now()) self.last_activity = int(etiquette.helpers.now())
def maintain(self): def maintain(self):
self.last_activity = int(helpers.now()) self.last_activity = int(etiquette.helpers.now())