-
Notifications
You must be signed in to change notification settings - Fork 3
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 fixed timeslots for bookable #69
base: master
Are you sure you want to change the base?
Add fixed timeslots for bookable #69
Conversation
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.
Instead of a JSON field, I would suggest a separate table with a FK to bookable.
Also instead of end date I would suggest a duration, otherwise there might be issues with DST. Then again I'm not sure what the booking rules for TF's bookables says about DST.
There! I still kept the end date, because normal bookings also use the end date instead of the duration. This should work if TF's normal booking rules work with DST. |
if Timeslot.objects.filter(bookable=self).count() > 0: return True | ||
return False |
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.
if Timeslot.objects.filter(bookable=self).count() > 0: return True | |
return False | |
return Timeslot.objects.filter(bookable=self).count() > 0 |
Here's a first version of how the fixed timeslots could work for bookables, according to enhancement #46.
This adds a new field in the admin form. The form is populated with javascript and changes are updated to the text input. If someone knows how to do it in a Django way, feel free to change it.
Features still to do: only suggest the bookable timeslots in the booking form when an user makes a booking.
Also, pls add the
hacktoberfest-accepted
label to this PR :D