def is_form_submitted():
 return (request and (request.method in ('PUT', 'POST')))

def is_form_submitted ( ) : return ( request and ( request . method in ( 'PUT' , 'POST' ) ) )
check if current method is put or post .