Giter Club home page Giter Club logo

learning-flask's Introduction

Learning Flask

This is a sample application for the Learning Flask course by Packt Publishing. Check out the live app here.

Python version: 2.7.x. For a Python 3.x version, check out this fork

Cloning the repo

First clone this repo by running

$ git clone https://github.com/lpolepeddi/learning-flask.git

Then cd into each folder to see what the code looks like at the end of that section in the course. For example, to see and run the code at Section 2, type

$ cd section-2
$ python routes.py

Deploying the app

To deploy your Flask app to Heroku, check out this guide

learning-flask's People

Contributors

lalithpolepeddi avatar zongyaojin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

learning-flask's Issues

Over query limit - Google Geocode

Running this app results in this error:
<[OVER QUERY LIMIT] Google - Geocode [empty]>

The error occurs in models.py at this point:

def address_to_latlng(self, address):
    g = geocoder.google(address)

A key is required for the query to work.

{
   "error_message" : "Keyless access to Google Maps Platform is deprecated. Please use an API key with all your API calls to avoid service interruption. For further details please refer to http://g.co/dev/maps-no-account",
   "results" : [],
   "status" : "OVER_QUERY_LIMIT"
}

Edit: The Google Geocode API requires a signup with billing details for an API key from June 2018. I switched to the Bing Maps API by signing up here (https://www.bingmapsportal.com/), and generating a key. It doesn't require any billing details.

  1. Replace geocode.google() with geocode.bing() in models.py.
  2. Save the key to env with heroku config key_bingmaps=[INSERT KEY HERE] in the terminal.
  3. Import key as variable import os geocode.bing(address, key=os.environ.key_bingmaps in models.py.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.