August 2016
Beginner to intermediate
717 pages
15h 24m
English
Google Maps offer a JavaScript API to insert maps into your websites. In this recipe, we will create a locations app with the Location model and extend the template of the change form in order to add a map where an administrator can find and mark geographical coordinates of a location.
We will start with the locations app that should be put under INSTALLED_APPS in the settings. Create a Location model there with a title, description, address, and geographical coordinates, as follows:
# locations/models.py # -*- coding: UTF-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible ...
Read now
Unlock full access