Exemple #1
0
def index():
    form = CountryForm()
    if request.method == 'POST' and form.validate_on_submit():
        country = Country()
        form.populate_obj(country)
        fill_map(form, country)
        country.put()
        return redirect(url_for('country.admin.index'))
    countries = Country.query()
    return render_template('country/admin/index.html',
        form=form,
        countries=countries)
Exemple #2
0
def get_countries_side(active_country_id):
    countries = Country.query(Country.is_public == True).order(Country.name)
    return render_template("j_env/countries_side.html", active_country_id=active_country_id, countries=countries)
Exemple #3
0
def get_countries_menu(in_country):
    countries = Country.query(Country.is_public == True).order(Country.name)
    return render_template("j_env/countries_menu.html", in_country=in_country, countries=countries)