def dbtest(): """ This is a hidden url route not available through website GUI. It serves as a test for developer's to make sure that their database and environment are up and running correctly. If the dev does not get an error message when louding this URL, then it can be assumed that the environment is working. """ from app.models import Location, Feature from app.weighter import Weightifier from app.geolocator import LocationWrap weightifier = Weightifier() location = Location.query.filter_by( name='Phoenix', countrycode='US').order_by('id').first() feature = Feature.query.first() wrap = LocationWrap(location) codes = weightifier._get_admin_codes(wrap, 5) names = weightifier._get_admin_names(codes) # wrap.set_adminnames(names) return render_template('dbtest.html', first_location=location, admin_codes=codes, admin_names=names, first_feature=feature)
def __init__(self): self.geocoder = Geocoder() self.geojsoner = GeoJSONer() self.weightifier = Weightifier() return