Holger Frey
7 years ago
2 changed files with 22 additions and 0 deletions
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
from pyramid.events import subscriber |
||||
|
||||
|
||||
class UserLogIn(object): |
||||
def __init__(self, request, user): |
||||
self.request = request |
||||
self.user = user |
||||
|
||||
|
||||
@subscriber(UserLogIn) |
||||
def set_display_defaults(event): |
||||
defaults = { |
||||
'users': { |
||||
'first': True, |
||||
'last': True, |
||||
'email': True, |
||||
} |
||||
} |
||||
event.request.session['display'] = defaults |
Reference in new issue