Example #1
0
def view_tour(tour_id):
    tour = TourDAO.get_tour_by_id(tour_id)
    weathers = WeatherFactory(tour.place, 7).get_weathers()

    applyed = False
    if current_user.is_authenticated:
        applyed = RegistrationDAO.check_registrated(current_user, tour)

    delay = DelayTourForm()

    return render_template('tour-view.html',
                           tour=tour,
                           weathers=weathers,
                           user=current_user,
                           applyed=applyed)