Exemplo n.º 1
0
def edit_country(id):
    continents = continent_repository.select_all()
    country = country_repository.select(id)
    sel_continent = country.continent.id
    return render_template("countries/edit.html",
                           country=country,
                           sel_continent=sel_continent,
                           continents=continents)
Exemplo n.º 2
0
def search():
    continents = continent_repository.select_all()
    countries = country_repository.select_all()
    cities = city_repository.select_all()
    sights = sight_repository.select_all
    return render_template("search.html",
                           continents=continents,
                           countries=countries,
                           cities=cities,
                           sights=sights)
Exemplo n.º 3
0
def countries_new():
    continents = continent_repository.select_all()
    return render_template("countries/add.html", continents=continents, title="Add a country")
Exemplo n.º 4
0
def new_country():
    continents = continent_repository.select_all()
    return render_template("countries/new.html", continents=continents)
Exemplo n.º 5
0
def countries_edit():
    country=country_repository.select(request.form['country_id'])
    continents = continent_repository.select_all()
    return render_template("countries/edit.html", country = country, continents = continents, title="Edit/Delete country")