def delete_route(req, id): RuleSet.g404(user=req.user, id=id).delete() return redirect('/')
def add_rule(req, id): ruleset = RuleSet.g404(user=req.user, id=id) return form_page(req, Rule, RuleForm, ruleset=ruleset, form_action='/add_rule/%s'%id, redirect_to='/')