aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/views/staff/jams/infractions/view.py
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-08-07 15:09:08 +0100
committerGravatar Gareth Coles <[email protected]>2018-08-07 15:09:16 +0100
commitaf54db6c136138c66cf5ca72419989525a0baa5c (patch)
tree8519aeab8d45277c51797c7dc23aacf3b56ed1bb /pysite/views/staff/jams/infractions/view.py
parentA wizard is never late, nor is he early. (diff)
Initial project layout for django
Diffstat (limited to 'pysite/views/staff/jams/infractions/view.py')
-rw-r--r--pysite/views/staff/jams/infractions/view.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/pysite/views/staff/jams/infractions/view.py b/pysite/views/staff/jams/infractions/view.py
deleted file mode 100644
index 235f99ac..00000000
--- a/pysite/views/staff/jams/infractions/view.py
+++ /dev/null
@@ -1,29 +0,0 @@
-from pysite.base_route import RouteView
-from pysite.constants import ALL_STAFF_ROLES
-from pysite.decorators import require_roles
-from pysite.mixins import DBMixin
-
-REQUIRED_KEYS = ["title", "date_start", "date_end"]
-
-
-class StaffView(RouteView, DBMixin):
- path = "/jams/infractions"
- name = "jams.infractions"
-
- table_name = "code_jam_infractions"
- users_table = "users"
-
- @require_roles(*ALL_STAFF_ROLES)
- def get(self):
- infractions = self.db.get_all(self.table_name)
-
- for document in infractions:
- user_obj = self.db.get(self.users_table, document["participant"])
-
- if user_obj:
- document["participant"] = user_obj
-
- return self.render(
- "staff/jams/infractions/view.html", infractions=infractions,
- infraction_ids=[i["id"] for i in infractions]
- )