Answer the question
In order to leave comments, you need to log in
Django. How to get entries that do not have a booking for a given period?
Ay nid yo help!
There is a Booking model with fields:
#Модель Booking
from_date = models.DateTimeField() #Дата начала бронирования
to_date = models.DateTimeField() #Дата конца бронирования
vehicle = models.ForeignKey(Vehicle .... # FK к модели автомобиля
confirmed = models.BooleanField(default=False) #Подвержденный или нет
Answer the question
In order to leave comments, you need to log in
The algorithm is as follows:
1. Take a sheet of paper
2. Draw your task on it
3. Strain the thing you usually eat in
4. It gives birth to a solution
If point number 4 did not work, change your profession
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question