예제 #1
0
파일: views.py 프로젝트: 4416/hazel-cms
def move(request, A, mode, B):
    switch = { 'before': lambda x,y: Layout.move(x, before=y),
               'after': lambda x,y: Layout.move(x, after=y),
               'to': lambda x,y: Layout.move(x, to=y) }
    switch[mode](A,B)
    return redirect(url_for('nut:layouts/list'), 301)