You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
515 B
21 lines
515 B
from minibase.blueprints.geography.models import Country, City, State, Region, Subregion
|
|
|
|
|
|
def queryCountryNames():
|
|
choices = Country.query.order_by(Country.name.asc())
|
|
return choices
|
|
|
|
|
|
def queryStateNames():
|
|
choices = State.query.order_by(State.name.asc())
|
|
return choices
|
|
|
|
def queryStateNamesOfCuntry(id):
|
|
choices = State.query.order_by(State.name.asc()).filter_by(country_id=id)
|
|
return choices
|
|
|
|
|
|
def queryCityNames():
|
|
choices = City.query.order_by(City.name.asc())
|
|
return choices
|