diff options
author | 2018-08-07 15:09:08 +0100 | |
---|---|---|
committer | 2018-08-07 15:09:16 +0100 | |
commit | af54db6c136138c66cf5ca72419989525a0baa5c (patch) | |
tree | 8519aeab8d45277c51797c7dc23aacf3b56ed1bb /pysite/views/staff/tables/table_bare.py | |
parent | A wizard is never late, nor is he early. (diff) |
Initial project layout for django
Diffstat (limited to 'pysite/views/staff/tables/table_bare.py')
-rw-r--r-- | pysite/views/staff/tables/table_bare.py | 30 |
1 files changed, 0 insertions, 30 deletions
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/<table>" - 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)) |