diff options
| author | rebecca <ubq323@ubq323.website> | 2026-10-31 17:29:03 +0000 |
|---|---|---|
| committer | rebecca <ubq323@ubq323.website> | 2026-10-31 22:11:04 +0000 |
| commit | ea63b8ecd7275ea1a3c0b198884d2b24f4a8ba58 (patch) | |
| tree | 1801e51b4490eb452a2988cb6261323be419b7c7 | |
| parent | 70722694a255739a43a4d70988daf3f7b6bb6f9d (diff) | |
repair irksome behaviour with next parameter
| -rw-r--r-- | apioforum/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apioforum/__init__.py b/apioforum/__init__.py index 276568f..06595c9 100644 --- a/apioforum/__init__.py +++ b/apioforum/__init__.py @@ -49,9 +49,11 @@ def create_app(): @app.context_processor def path_for_next(): - p = request.path - if len(request.query_string) > 0 and not p.startswith("/auth"): - p += "?" + request.query_string.decode("utf-8") + p = request.args.get('next', None) + if p is None: + p = request.path + if len(request.query_string) > 0: + p += "?" + request.query_string.decode("utf-8") return dict(path_for_next=p) app.jinja_env.globals.update(forum_path=forum.forum_path) |
