Thanks for the help! On Thursday, November 3, 2022 at 7:28:08 PM UTC subtitle indo wrote:
> Please let me know if that sounds okay. > > On Wed, Nov 2, 2022 at 6:05 PM Kevin gallagher <[email protected]> > wrote: > >> Hi guys, >> Im currently learning django and am doing a project for college. Im >> building an appointment website users can book a training session. These >> are my models: >> >> class TimeSlot(models.Model): >> >> title = models.CharField(max_length=50) >> >> def __str__(self): >> return f'There is a slot at {self.title}' >> >> >> class Booking(models.Model): >> >> user = models.ForeignKey(settings.AUTH_USER_MODEL, >> on_delete=models.CASCADE) >> time_slot = models.ForeignKey(TimeSlot, on_delete=models.CASCADE) >> booking_date = models.DateField(("Date"), default=date.today) >> >> def __str__(self): >> return f'{self.user} has booked a session at >> {self.timeslot.title} on {self.booking_date}' >> >> I have the title field set as available session times, 1-2pm, 3-4pm etc. >> I want the user to select a date and then be able to see what time slots >> are still available to book but I'm kind of lost and confused. Any help >> would be much appreciated! >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/1c6c2ab1-f852-4503-81c5-d072cf2dbb02n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/1c6c2ab1-f852-4503-81c5-d072cf2dbb02n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/df45710f-3081-4836-bd09-d8060069d974n%40googlegroups.com.

