This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

django-treasuremap

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

Requirements

  • Python 2.7+ or Python 3.2+
  • Django 1.6+

Installation

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

Example:

pip install django-treasuremap

Add treasuremap to INSTALLED_APPS:

Example:

INSTALLED_APPS = (
    ...
    'treasuremap',
    ...
)

Configuration

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

Example:

TREASURE_MAP = {
    'BACKEND': 'treasuremap.backends.google.GoogleMapBackend',
    '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()
<head>
    ...
    <!-- jQuery is required; include if need -->
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    ...
</head>

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

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

Settings

Support map:

  • Google map treasuremap.backends.google.GoogleMapBackend
  • Yandex map treasuremap.backends.yandex.YandexMapBackend

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”.
Release History

Release History

0.2.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-treasuremap-0.2.4.tar.gz (9.8 kB) Copy SHA256 Checksum SHA256 Source Aug 3, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting