rewrite view follow flask restful extension