Answer the question
In order to leave comments, you need to log in
How to embed Yandex Map in Django admin panel?
I welcome everyone!
Tell me the direction in which to dig on the following problem: there is an "Event" model with fields: name, address, coordinates (to display the mark on the map
) on the map or write the address in the form field and the map displayed this place. Accordingly, then save these data address and coordinates.
So far, I've thought of the following: change the admin template by inserting a jQuery ajax script in order to receive coordinates when entering the address and rebuild the map, while adding the coordinates to a hidden form field in order to save it to the model later. But I still don’t know exactly how to push the card into the form for creating an event. If you have any ideas, please tell me, and in general, maybe there is an easier way?
Answer the question
In order to leave comments, you need to log in
The map can be inserted using django-leaflet , only there will be not Yandex, but OSM. Well, the database is needed by PostgreSQL with the PostGIS extension, the coordinates will be stored in a field with the Point type.
It's possible there is an easier way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question