From af54db6c136138c66cf5ca72419989525a0baa5c Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Tue, 7 Aug 2018 15:09:08 +0100 Subject: Initial project layout for django --- pysite/views/staff/tables/table_bare.py | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 pysite/views/staff/tables/table_bare.py (limited to 'pysite/views/staff/tables/table_bare.py') diff --git a/pysite/views/staff/tables/table_bare.py b/pysite/views/staff/tables/table_bare.py deleted file mode 100644 index abd6cb19..00000000 --- a/pysite/views/staff/tables/table_bare.py +++ /dev/null @@ -1,30 +0,0 @@ -from flask import redirect, request, url_for -from werkzeug.exceptions import NotFound - -from pysite.base_route import RouteView -from pysite.constants import TABLE_MANAGER_ROLES -from pysite.decorators import require_roles -from pysite.mixins import DBMixin -from pysite.tables import TABLES - - -class TableView(RouteView, DBMixin): - path = "/tables/" - name = "tables.table_bare" - - @require_roles(*TABLE_MANAGER_ROLES) - def get(self, table): - if table not in TABLES: - raise NotFound() - - search = request.args.get("search") - - args = { - "table": table, - "page": 1 - } - - if search is not None: - args["search"] = search - - return redirect(url_for("staff.tables.table", **args)) -- cgit v1.2.3