def sched(day): if not sess.mysched or not sess.myep: abort(403) if day not in ("today", "tomorrow"): flash("Day is not supported!", "error") else: if generateyml(day=day, notify=False): flash("Scheduled created for %s" % day) else: flash("Failed to create schedule for %s" % day, "error") return redirect("/config")
def new(day): if not sess.mysched or not sess.myep: abort(403) if day not in ("today", "tomorrow", "yesterday"): flash("Day is not supported!", "error") else: if generateyml(sched=False, day=day): flash("Generated yml file for %s" % day) else: flash("Failed to generated yml file for %s" % day, "error") return redirect("/config")