diff options
author | Marius Peter <marius.peter@tutanota.com> | 2022-07-24 16:00:28 +0200 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2022-07-24 16:00:28 +0200 |
commit | 18a64c63920bdaba1b8348493b8e7eb1cdc81294 (patch) | |
tree | f48032f9f13352500c0d7ccdabb46336c9dc5be7 /app | |
parent | ffaee081c018b0e254844910fd3878f916196054 (diff) |
Modules paths.
Diffstat (limited to 'app')
-rw-r--r-- | app/modules/common.py | 6 | ||||
-rw-r--r-- | app/modules/customers/routes.py | 4 | ||||
-rw-r--r-- | app/modules/products/routes.py | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/app/modules/common.py b/app/modules/common.py index ff0aec7..691ff9d 100644 --- a/app/modules/common.py +++ b/app/modules/common.py @@ -32,7 +32,7 @@ def add_item(module, table): db.session.commit() item_pk = model.query.order_by(model.primary_key.desc()).first().primary_key flash(f"Successfully added item #{item_pk} to {table} table.", "info") - return redirect(f"/modules/{module}") + return redirect("/fapg" + f"/modules/{module}") return render_template("modules/add-item.html", table=table, form=form) @@ -53,7 +53,7 @@ def edit_item(module, table, pk): model.query.filter_by(primary_key=pk).update(form_values) db.session.commit() flash(f"Successfully edited item #{pk} in {table} table.", "info") - return redirect(f"/modules/{module}") + return redirect("/fapg" + f"/modules/{module}") return render_template("modules/edit-item.html", table=table, pk=pk, form=form) @@ -66,7 +66,7 @@ def delete_item(module, table, pk): db.session.delete(record) db.session.commit() flash(f"Successfully removed item #{pk} from {table} table.", "info") - return redirect(f"/modules/{module}") + return redirect("/fapg" + f"/modules/{module}") @common.route("/modules/settings") diff --git a/app/modules/customers/routes.py b/app/modules/customers/routes.py index c8ae072..9db604e 100644 --- a/app/modules/customers/routes.py +++ b/app/modules/customers/routes.py @@ -29,8 +29,8 @@ def view(): modules = Module.query.all() cust = Customer.query.order_by(Customer.primary_key.desc()) module = "customers" - flash(f"Successfully accessed module {module}.", "info") - flash(f"Still fighting against styling in {module}.", "error") + # flash(f"Successfully accessed module {module}.", "info") + # flash(f"Still fighting against styling in {module}.", "error") return render_template( f"modules/{module}.html", modules=modules, diff --git a/app/modules/products/routes.py b/app/modules/products/routes.py index 735fef9..369c801 100644 --- a/app/modules/products/routes.py +++ b/app/modules/products/routes.py @@ -13,7 +13,7 @@ products = Blueprint("products", __name__) @products.route("/modules/products") @login_required -def list(): +def view(): modules = Module.query.all() prods = Product.query.order_by(Product.primary_key.desc()) module = "products" |