diff options
author | 2018-05-18 16:00:31 +0100 | |
---|---|---|
committer | 2018-05-18 16:00:31 +0100 | |
commit | e1846928439aa2a7e660d870a083872c415c274d (patch) | |
tree | e716f3466ca3914f80b2ca102d5d345658af7bc8 /pysite/views/staff/jams/index.py | |
parent | Update wiki footer in line with main site (diff) |
[Jams] Huge amount of work on code jam admin area
Diffstat (limited to 'pysite/views/staff/jams/index.py')
-rw-r--r-- | pysite/views/staff/jams/index.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pysite/views/staff/jams/index.py b/pysite/views/staff/jams/index.py new file mode 100644 index 00000000..40a8387c --- /dev/null +++ b/pysite/views/staff/jams/index.py @@ -0,0 +1,15 @@ +from pysite.base_route import RouteView +from pysite.constants import ALL_STAFF_ROLES, JAM_STATES +from pysite.decorators import require_roles +from pysite.mixins import DBMixin + + +class StaffView(RouteView, DBMixin): + path = "/jams" + name = "jams.index" + table_name = "code_jams" + + @require_roles(*ALL_STAFF_ROLES) + def get(self): + jams = self.db.get_all(self.table_name) + return self.render("staff/jams/index.html", jams=jams, states=JAM_STATES) |