enable gzip

This commit is contained in:
j 2014-05-25 12:59:43 +02:00
parent 797606db01
commit ed2b7cebfc
2 changed files with 7 additions and 3 deletions

View File

@ -33,7 +33,8 @@ def run():
static_path = os.path.join(root_dir, 'static') static_path = os.path.join(root_dir, 'static')
options = { options = {
'debug': not PID 'debug': not PID,
'gzip': True
} }
handlers = [ handlers = [

View File

@ -80,8 +80,11 @@ class User(db.Model):
self.pending = '' self.pending = ''
if username: if username:
self.info['username'] = username self.info['username'] = username
else:
self.set_nickname(self.info.get('username', 'anonymous')) username = self.info.get('username')
if not username:
username = 'anonymous'
self.set_nickname(username)
# FIXME: need to set peered to False to not trigger changelog event # FIXME: need to set peered to False to not trigger changelog event
# before other side receives acceptPeering request # before other side receives acceptPeering request
self.peered = False self.peered = False