Exemplo n.º 1
0
def areaInfo():
  conn = getPostgresConnection()
  areaid = request.args.get('areaid', '').split(',')
  areaInfos = geo_utils.getInfoForAreaIds(conn, areaid)

  for info in areaInfos:
    areaid = info['areaid']
    info['neighborhoods'] = getLabelsByArea(conn, areaid)
    info['cities'] = getCitiesByArea(conn, areaid)

  return jsonify({'areas': areaInfos})
Exemplo n.º 2
0
def profile():
    conn = getPostgresConnection()
    areaids = vote_utils.getAreaIdsForUserId(conn, current_user.id)
    areas = geo_utils.getInfoForAreaIds(conn, areaids)
    return render_template('profile.html',
        areas=areas,
        twitter_conn=current_app.social.twitter.get_connection(),
        facebook_conn=current_app.social.facebook.get_connection(),
        foursquare_conn=current_app.social.foursquare.get_connection(),
        google_conn=current_app.social.google.get_connection()
    )
Exemplo n.º 3
0
def areaInfo():
    conn = getPostgresConnection()
    areaid = request.args.get('areaid', '').split(',')
    areaInfos = geo_utils.getInfoForAreaIds(conn, areaid)

    for info in areaInfos:
        areaid = info['areaid']
        info['neighborhoods'] = getLabelsByArea(conn, areaid)
        info['cities'] = getCitiesByArea(conn, areaid)

    return jsonify({'areas': areaInfos})
Exemplo n.º 4
0
def profile():
    conn = getPostgresConnection()
    areaids = vote_utils.getAreaIdsForUserId(conn, current_user.id)
    areas = geo_utils.getInfoForAreaIds(conn, areaids)
    return render_template(
        'profile.html',
        areas=areas,
        twitter_conn=current_app.social.twitter.get_connection(),
        facebook_conn=current_app.social.facebook.get_connection(),
        foursquare_conn=current_app.social.foursquare.get_connection(),
        google_conn=current_app.social.google.get_connection())
Exemplo n.º 5
0
def profile():
    conn = psycopg2.connect("dbname='gis' user='******' host='localhost' password='******'")
    areaids = vote_utils.getAreaIdsForUserId(conn, current_user.id)
    areas = geo_utils.getInfoForAreaIds(conn, areaids)
    return render_template('profile.html',
        areas=areas,
        twitter_conn=current_app.social.twitter.get_connection(),
        facebook_conn=current_app.social.facebook.get_connection(),
        github_conn=current_app.social.github.get_connection(),
        foursquare_conn=current_app.social.foursquare.get_connection(),
        google_conn=current_app.social.google.get_connection()
    )
Exemplo n.º 6
0
def profile():
    conn = psycopg2.connect(
        "dbname='gis' user='******' host='localhost' password='******'")
    areaids = vote_utils.getAreaIdsForUserId(conn, current_user.id)
    areas = geo_utils.getInfoForAreaIds(conn, areaids)
    return render_template(
        'profile.html',
        areas=areas,
        twitter_conn=current_app.social.twitter.get_connection(),
        facebook_conn=current_app.social.facebook.get_connection(),
        github_conn=current_app.social.github.get_connection(),
        foursquare_conn=current_app.social.foursquare.get_connection(),
        google_conn=current_app.social.google.get_connection())
Exemplo n.º 7
0
def areaInfo():
  conn = psycopg2.connect("dbname='gis' user='******' host='localhost' password='******'")
  areaid = request.args.get('areaid', '').split(',')
  areaInfos = geo_utils.getInfoForAreaIds(conn, areaid)
  return jsonify({'areas': areaInfos})
Exemplo n.º 8
0
def areaInfo():
    conn = psycopg2.connect(
        "dbname='gis' user='******' host='localhost' password='******'")
    areaid = request.args.get('areaid', '').split(',')
    areaInfos = geo_utils.getInfoForAreaIds(conn, areaid)
    return jsonify({'areas': areaInfos})