Exemplo n.º 1
0
def send_departure_email():
    # get all bookings departing today
    locations = Location.objects.all()
    for location in locations:
        today = timezone.localtime(timezone.now())
        departing = Use.objects.filter(location=location).filter(depart=today).filter(status='confirmed')
        for use in departing:
            goodbye_email(use)
Exemplo n.º 2
0
def send_departure_email():
	# get all reservations departing today
	locations = Location.objects.all()
	for location in locations:
		today = timezone.localtime(timezone.now())
		departing = Reservation.objects.filter(location=location).filter(depart=today).filter(status='confirmed')
		for reservation in departing:
			print 'sending goodbye email to %s' % reservation.user.email
			goodbye_email(reservation)
Exemplo n.º 3
0
def send_departure_email():
    logger.info("Running task: send_departure_email")
    # get all bookings departing today
    locations = Location.objects.all()
    for location in locations:
        today = timezone.localtime(timezone.now())
        departing = Use.objects.filter(location=location).filter(
            depart=today).filter(status='confirmed')
        for use in departing:
            goodbye_email(use)