|
|
|
@ -8,6 +8,8 @@ from pyramid.view import view_config
@@ -8,6 +8,8 @@ from pyramid.view import view_config
|
|
|
|
|
from ordr2.models import User, Role |
|
|
|
|
from ordr2.schemas.account import UserSchema |
|
|
|
|
|
|
|
|
|
from . import update_column_display |
|
|
|
|
|
|
|
|
|
# user log in and log out |
|
|
|
|
|
|
|
|
|
@view_config( |
|
|
|
@ -53,14 +55,7 @@ def user_list(context, request):
@@ -53,14 +55,7 @@ def user_list(context, request):
|
|
|
|
|
) |
|
|
|
|
def change_column_view(context, request): |
|
|
|
|
''' changes the columns to display ''' |
|
|
|
|
display = { |
|
|
|
|
'first': False, |
|
|
|
|
'last': False, |
|
|
|
|
'email': False |
|
|
|
|
} |
|
|
|
|
columns = [col for key, col in request.POST.items() if key == 'display'] |
|
|
|
|
display.update({ column: True for column in columns }) |
|
|
|
|
request.session['display']['users'] = display |
|
|
|
|
update_column_display(request, 'users') |
|
|
|
|
return HTTPFound(context.url()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|