-
Notifications
You must be signed in to change notification settings - Fork 11
app.views
All the views in the app
Template: app/pages/index.html
Methods: GET
The index for the website. Displays every schedule.
Template: app/pages/create_schedule.html
Methods: GET, POST
Raises PermissionDenied
if not authenticated.
The form for creating a schedule.
Expects the following data:
should_lock_automatically: bool
auto_lock_after: ISO Timestamp (optional)
name: string
Creates a new schedule using the data given then redirects the user to the newly created schedule.
Template: app/pages/schedule.html
Methods: GET, POST
Displays to the user every day there are timeslots. Each card links to their corresponding schedule-day page. Has a form used by the owner for locking/deleting/editing their timeslots.
Updates the schedule with the given information.
timeslot_id: int list
timeslot_date: ISO 8601 date list
action: "lock" | "unlock" | "delete"
next: url path string
Template: app/pages/schedule_edit.html
Methods: GET, POST
Raises PermissionDenied
if not authenticated.
Displays the form to edit the schedule name and description.
Expects the following data:
name: string
description: string
Template: N/A
Methods: POST
Form Model: app.forms.CopyTimeslotsForm
Raises PermissionDenied
if the user is not the owner of the schedule. Also raises UnsupportedOperation
if form data is not valid.
Expects the following data:
action: string
timeslots: string (list of TimeSlot primary keys, separated by commas)
to_date: string
to_time: string
Form converts string timeslots variable to list of TimeSlot
objects. to_date
and to_time
are also converted to DateField
and TimeField
.
Template: app/pages/reservations_view_schedule.html
Methods: GET, POST
Raises PermissionDenied
if the user is not the owner of the schedule.
Views the current reservations for the entire schedule.
Expects the following data:
action: string
id: int
Template: app/pages/create_timeslots.html
Methods: GET, POST
Form Model: app.forms.TimeslotGenerationForm
The form for generating a range of timeslots.
If the form is invalid, render the template with the bad data. Else, generates the range of timeslots given the form data then redirects the user back to the schedule page.
Template: app/pages/schedule_day.html
Methods: GET, POST
Displays every timeslot for the given day. Each timeslot card links to their corresponding reservation form.
Updates the timeslots selected.
timeslot_id: int list
timeslot_date: ISO 8601 date list
action: "lock" | "unlock" | "delete"
next: url path string
Template: app/pages/reserve_timeslot.html
Methods: GET, POST
Form Model: app.forms.ReservationForm
The reservation form.
Creates a timeslot reservation object for the timeslot and then redirects the user to the reserve-confirmed page.
Template: app/pages/reservations_view.html Methods: GET, POST
View and manage the reservations for the given timeslot.
Expects the following data:
action: string
id: Reservation ID
Deletes the reservation associated with the given ID
Template: app/pages/find_reservation.html
Methods: GET, POST
Shows the form to find your reservation, using your name and email.
There are two types of POSTs for this view. The first type expects:
name: string
email: string
and the second expects:
action: string
id: int
Templates: app/pages/reserve_confirmed.html, app/pages/reserve_failed.html Methods: GET
Tries to confirm the reservation. If the resevervation limit has been hit, the view directs the user to the reserve_failed
template, else it set's the reservation's confirmed property to true and sends the user to the reserve_confirmed
template.
Templates: app/pages/reserve_cancelled.html Methods: GET, POST
An "are you sure" page that when "yes" is clicked, will delete the reservation.
Deletes the reservation and redirects user to /
.
Template: app/pages/reserve_confirmed.html
Methods: GET
The reservation confirmed page. Also features our mascot "rat a toster ski" (working title)
Template: app/pages/schedules.html
Methods: GET
Shows all schedules associated with user_id
.
- Things we use
- Heroku Maintaining
- Creating a dev environment
- Documentation Guidelines
- Calendar Integration Schema