signup. Route handler or application helper. This docstring was expanded to make future maintenance easier. Returns: Varies.
()
| 10678 | add("Localhost", globals().get("CURRENT_LOCALHOST_URL")) |
| 10679 | add("Cloudflared", globals().get("CLOUDFLARED_URL")) |
| 10680 | onion = globals().get("TOR_ONION") |
| 10681 | add("Tor", ("http://" + str(onion).strip()) if onion else None) |
| 10682 | |
| 10683 | # Also include the URL currently used by the visitor when it is not already listed. |
| 10684 | try: |
| 10685 | add("Current link", request.url_root) |
| 10686 | except Exception as exc: |
| 10687 | log.error("Could not read current request URL for QR list: %s", exc) |
| 10688 | |
| 10689 | return cards |
| 10690 | |
| 10691 | |
| 10692 | # --------------------------- |
| 10693 | # Routes: auth/home |
| 10694 | # --------------------------- |
| 10695 | |
| 10696 | @app.route("/landing") |
| 10697 | def landing(): |
| 10698 | return index() |
| 10699 | |
| 10700 | @app.route("/") |
| 10701 | def index(): |
| 10702 | """index. |
| 10703 | |
| 10704 | Route handler or application helper. |
| 10705 | |
| 10706 | This docstring was expanded to make future maintenance easier. |
| 10707 | |
| 10708 | Returns: |
| 10709 | Varies. |
| 10710 | """ |
| 10711 | if is_logged_in(): |
| 10712 | return redirect(url_for("profiler")) |
| 10713 | return render_template("landing.html", title="ButSystem", login_link_cards=_login_link_cards()) |
| 10714 | |
| 10715 | @app.route("/home") |
| 10716 | @login_required |
| 10717 | def home(): |
| 10718 | """Deprecated landing/dashboard page. |
| 10719 | |
| 10720 | The prior dashboard page shown after login was removed per request. |
| 10721 | We keep the route to avoid breaking old bookmarks, but redirect users |
| 10722 | to Profiler (the new landing page). |
| 10723 | """ |
| 10724 | return redirect(url_for("profiler")) |
| 10725 | |
| 10726 | @app.route("/loading") |
| 10727 | @login_required |
| 10728 | def loading(): |
| 10729 | """Small loading screen shown right after login. |
| 10730 | |
| 10731 | This prevents the user from briefly seeing intermediate pages while the |
| 10732 | session, profile row, and other bootstrap data is prepared. |
| 10733 | """ |
| 10734 | me = current_user() |
| 10735 | try: |
| 10736 | prof = get_profile(me) |
| 10737 | display_name = (prof.get("nickname") or "").strip() or me |
nothing calls this directly
no test coverage detected