F
F
fantomart2019-03-11 05:22:17
Django
fantomart, 2019-03-11 05:22:17

How to solve Easy_maps (google maps api) connection problem?

Tried to connect Easy Maps ( https://pypi.org/project/django-easy-maps/ ) to the site. I did everything according to the instructions, but the map simply does not appear on the page. There are no errors in the console from which I start the server.
What I did:
1) Installed Easy maps
pip install django-easy-maps
2) Added the application to the list

INSTALLED_APPS = (
    ...
    'easy_maps',)

3) Performed migrations
./manage.py migrate
4) Got Google Maps API and inserted it into settings
EASY_MAPS_GOOGLE_MAPS_API_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___0123456789'

5) I inserted the code into the html file
{% load easy_maps_tags %}

<!-- Default map with 300x400 dimensions -->
{% easy_map "Russia, Ekaterinburg, Mira 32" 300 400 %}

6) Launched python manage.py runserver
I found on the Internet that for some it worked only with the connected maps.html file. Therefore, I tried to add maps.html from the example to the API in my project and write in paragraph No. 5:
{% load easy_maps_tags %}

 <!-- Default map with 300x400 dimensions -->
 {% easy_map "Russia, Ekaterinburg, Mira 32" 300 400 using 'map.html' %}

The result is the same.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question