#NEWLINE# def GET( self , workshop_id ) : #NEWLINE# #INDENT# workshop = get_workshop ( id = workshop_id ) #NEWLINE# org = workshop . get_org ( ) #NEWLINE# if ( not org . can_update ( account . get_current_user ( ) ) ) : #NEWLINE# #INDENT# return render_template ( 'permission_denied.html' ) #NEWLINE# #UNINDENT# if ( web . ctx . method == 'POST' ) : #NEWLINE# #INDENT# i = web . input ( ) #NEWLINE# form = forms . NewWorkshopForm ( i ) #NEWLINE# if form . validate ( ) : #NEWLINE# #INDENT# workshop . update ( title = i . title , description = workshop . description , expected_participants = i . expected_participants , date = i . date ) #NEWLINE# flash ( 'Thanks for updating the workshop details.' ) #NEWLINE# return web . seeother ( '/workshops/{}' . format ( workshop . id ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# form = forms . NewWorkshopForm ( workshop . dict ( ) ) #NEWLINE# #UNINDENT# return render_template ( 'workshops/edit.html' , org = org , workshop = workshop , form = form )