def user(): if "user" in session: form = SignOutForm() if form.validate_on_submit(): return redirect(url_for("logout")) return render_template('login.html', form=form) else: return redirect(url_for("login"))
def log_sign_out(): """Record a sign in on the Google Sheet.""" form = SignOutForm(request.form) if not form.validate_on_submit(): app.logger.info("Sign out form not valid") for field, errors in form.errors.items(): for error in errors: flash(f"Error in the {getattr(form, field)} field: {error}") return redirect(url_for("sign_out")) app.logger.debug("Sending sign out task") celery.send_task( "tasks.add_sign_out", args=[ form.cub_name.data, form.parent_signature.data, form.time.data, form.date.data, app.config["SPREADSHEET_ID"], app.config["ROLL_SHEET"], ], kwargs={}, ) return redirect(url_for("sign_out"))
def userdeveloper(): form = SignOutForm() if form.validate_on_submit(): return redirect(url_for("logout")) return render_template('developer.html', form=form)
def userDemand(): form = SignOutForm() if form.validate_on_submit(): return redirect(url_for("logout")) return render_template('addDemand.html', form=form)
def userregisterScrumMaste(): form = SignOutForm() if form.validate_on_submit(): return redirect(url_for("logout")) return render_template('scrumMaster.html', form=form)