Skip to main content

django-treasuremap app, makes it easy to store and display the location on the map using different providers (Google, Yandex).

Project description


django-treasuremap app, makes it easy to store and display the location on the map using different providers (Google, Yandex, etc).


  • Python 2.7+ or Python 3.3+
  • Django 1.8+


Use your favorite Python package manager to install the app from PyPI, e.g.


pip install django-treasuremap

Add treasuremap to INSTALLED_APPS:




Within your, you’ll need to add a setting (which backend to use, etc).


    'BACKEND': '',
    'API_KEY': 'Your API key',
    'SIZE': (400, 600),
    'MAP_OPTIONS': {
        'zoom': 5

Example usage

In models

from django.db import models
from treasuremap.fields import LatLongField

class ShopModel(models.Model):
    name = models.CharField(max_length=100)
    point = LatLongField(blank=True)

In forms

from django import forms
from treasuremap.forms import LatLongField

class ShopForm(models.Model):
    point = LatLongField()
    <!-- jQuery is required; include if need -->
    <script type="text/javascript" src="//"></script>

<form method="POST" action=".">
    {{ }}
    {% csrf_token %}
    {{ form.as_p }}

Depending on what backend you are using, the correct widget will be displayed with a marker at the currently position (jQuery is required).


Support map:

  • Google map
  • Yandex map

Other settings:

  • API_KEY - if need, default None
  • SIZE - tuple with the size of the map, default (400, 400)
  • ONLY_MAP - hide field lat/long, default True
  • MAP_OPTIONS - dict, used to initialize the map, default {'latitude': 51.562519, 'longitude': -1.603156, 'zoom': 5}. latitude and longitude is required, do not use other “LatLong Object”.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-treasuremap, version 0.2.7
Filename, size File type Python version Upload date Hashes
Filename, size django_treasuremap-0.2.7-py2.py3-none-any.whl (14.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-treasuremap-0.2.7.tar.gz (10.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page