6. Views¶
6.1. Hunt Views¶
-
huntserver.hunt_views.
protected_static
(request, file_path)[source]¶ A view to serve protected static content. Does a permission check and if it passes, the file is served via X-Sendfile.
-
huntserver.hunt_views.
hunt
(request, hunt_num)[source]¶ The main view to render hunt templates. Does various permission checks to determine the set of puzzles to display and then renders the string in the hunt’s “template” field to HTML.
-
huntserver.hunt_views.
current_hunt
(request)[source]¶ A simple view that calls
huntserver.hunt_views.hunt
with the current hunt’s number.
-
huntserver.hunt_views.
prepuzzle
(request, puzzle_id)[source]¶ A view to handle answer submissions via POST and render the prepuzzle’s template.
-
huntserver.hunt_views.
hunt_prepuzzle
(request, puzzle_id)[source]¶ A simple view that locates the correct prepuzzle for a hunt and redirects there if it exists.
-
huntserver.hunt_views.
current_prepuzzle
(request, puzzle_id)[source]¶ A simple view that locates the correct prepuzzle for the current hunt and redirects to there.
-
huntserver.hunt_views.
puzzle_view
(request, puzzle_id)[source]¶ A view to handle answer submissions via POST, handle response update requests via AJAX, and render the basic per-puzzle pages.
-
huntserver.hunt_views.
puzzle_hint
(request, puzzle_id)[source]¶ A view to handle hint requests via POST, handle response update requests via AJAX, and render the basic puzzle-hint pages.
-
huntserver.hunt_views.
chat
(request)[source]¶ A view to handle message submissions via POST, handle message update requests via AJAX, and render the hunt participant view of the chat.
6.2. Info Views¶
-
huntserver.info_views.
index
(request)[source]¶ Main landing page view, mostly static with the exception of hunt info
-
huntserver.info_views.
previous_hunts
(request)[source]¶ A view to render the list of previous hunts, will show any hunt that is ‘public’
6.3. Staff Views¶
-
huntserver.staff_views.
queue
(request, page_num)[source]¶ A view to handle queue response updates via POST, handle submission update requests via AJAX, and render the queue page. Submissions are pre-rendered for standard and AJAX requests.
-
huntserver.staff_views.
progress
(request)[source]¶ A view to handle puzzle unlocks via POST, handle unlock/solve update requests via AJAX, and render the progress page. Rendering the progress page is extremely data intensive and so the view involves a good amount of pre-fetching.
-
huntserver.staff_views.
charts
(request)[source]¶ A view to render the charts page. Mostly just collecting and organizing data
-
huntserver.staff_views.
admin_chat
(request)[source]¶ A view to handle chat update requests via AJAX and render the staff chat page. Chat messages are pre-rendered for both standard and AJAX requests.
-
huntserver.staff_views.
hunt_info
(request)[source]¶ A view to render the hunt info page, which contains room and allergy information
-
huntserver.staff_views.
control
(request)[source]¶ A view to handle all of the different management actions from staff users via POST requests. This view is not responsible for rendering any normal pages.
-
huntserver.staff_views.
staff_hints_text
(request)[source]¶ A view to handle hint response updates via POST, handle hint request update requests via AJAX, and render the hint page. Hints are pre-rendered for standard and AJAX requests.
-
huntserver.staff_views.
staff_hints_control
(request)[source]¶ A view to handle the incrementing, decrementing, and updating the team hint counts on the hints staff page.
6.4. Auth Views¶
-
huntserver.auth_views.
login_selection
(request)[source]¶ A mostly static view to render the login selection. Next url parameter is preserved.
-
huntserver.auth_views.
create_account
(request)[source]¶ A view to create user and person objects from valid user POST data, as well as render the account creation form.