I want to make a simple reservation app with a arrival date en a
departure date. I have this simple model:
class Booking(models.Model):
Houses = models.CharField(max_length=3)
Reservation = models.ForeignKey('Data', blank=True)
def __unicode__(self):
return self.Houses
class Data(models.Model):
Name = models.CharField(max_length=30)
Arrival = models.DateField()
Departure = models.DateField()
def __unicode__(self):
return '%s %s %s' % (self.Name, self.Arrival,
self.Departure)
I made a simple form were users can enter and arrival and depature
date. With these dates I want to make a query to get a list of houses
which are available at this time. Can anybody push me a bit in the
right direction?
I had a look at Entry.objects.filter(pub_date__range=(start_date,
end_date)) but this does the opposite.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.