March 2020
Intermediate to advanced
608 pages
17h 17m
English
Register for a Google Maps API key and expose it to the templates, just like we did in the Using HTML5 data attributes recipe in Chapter 4, Templates and JavaScript. Note that for this recipe, in the Google Cloud Platform console, you will need to activate Maps JavaScript API and Geocoding API. For those APIs to function, you also need to set billing data.
We will continue by creating a locations app:
# myproject/settings/_base.pyINSTALLED_APPS = [ # … "myproject.apps.locations",]
# myproject/apps/locations/models.pyimport osimport uuidfrom collections import ...