예제 #1
0
def get_inital_flight_prices(days=120):
    dates = get_dates(days)
    destinations = Destinations.objects.filter(dates=dates)[:1][0]
    cites = destinations.destinations.all()[:5]
    for city in cites:
        print city.name
        print city.country
        get_flight_prices(destinations.origin, city, dates)
예제 #2
0
def get_inital_flight_prices(days=120):
    dates = get_dates(days)
    destinations = Destinations.objects.filter(dates=dates)[:1][0]
    cites = destinations.destinations.all()[:5]
    for city in cites:
        print city.name
        print city.country
        get_flight_prices(destinations.origin, city, dates)
예제 #3
0
def update_flight_prices(limit):
    print "###################"
    print "###################"
    print "###################"
    slices = Slice.objects.all().order_by("price")[:limit]
    for slice in slices:
        print slice.origin.name
        print slice.dates.departure_date
        print slice.dates.return_date
        print slice.destination.name
        get_flight_prices(slice.origin, slice.destination, slice.dates)
예제 #4
0
def update_flight_prices(limit):
    print '###################'
    print '###################'
    print '###################'
    slices = Slice.objects.all().order_by('price')[:limit]
    for slice in slices:
        print slice.origin.name
        print slice.dates.departure_date
        print slice.dates.return_date
        print slice.destination.name
        get_flight_prices(slice.origin, slice.destination, slice.dates)