-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add backend for bookable office hours #324
base: master
Are you sure you want to change the base?
Conversation
- Created new Booking model, serializer, permission, urls, and viewset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is an issue with the Booking creation logic–please read my comment on it. Otherwise, I think we're pretty close to getting this merged. I'd encourage you to write some tests too.
serializer_class = BookingSerializer | ||
permission_classes = [BookingPermission | IsSuperuser] | ||
|
||
def create(self, request, *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we only allowed to create bookings in chronological order? For example, if an occurrence is from 1-3pm and no other bookings existed, I would only be able to book a slot at 1pm. If someone had booked starting at 1pm, I would only be able to book a 1:30pm spot (assuming interval is 30mins).
Note: These changes will not be fully functional until the Occurrence model in schedule.models is updated (pull request is open in the django-schedules repository with those minor changes)