{ "info": { "author": "Philipp Bosch", "author_email": "hello@pb.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "==================\ndjango-geoposition\n==================\n\nA model field that can hold a geoposition (latitude/longitude), and corresponding admin/form widget.\n\n.. image:: https://badge.fury.io/py/django-geoposition.svg\n :target: https://badge.fury.io/py/django-geoposition\n\n.. image:: https://travis-ci.org/philippbosch/django-geoposition.svg?branch=master\n :target: https://travis-ci.org/philippbosch/django-geoposition\n\n.. image:: https://badges.gitter.im/philippbosch/django-geoposition.svg\n :alt: Join the chat at https://gitter.im/philippbosch/django-geoposition\n :target: https://gitter.im/philippbosch/django-geoposition?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\nPrerequisites\n-------------\n\nStarting with version 0.3, django-geoposition requires Django 1.8 or greater.\nIf you need to support Django versions prior to 1.8 please use django-geoposition 0.2.3.\nFor Django versions prior to 1.4.10 please use django-geoposition 0.1.5.\n\n\nInstallation\n------------\n\n- Use your favorite Python packaging tool to install ``geoposition``\n from `PyPI`_, e.g.::\n\n pip install django-geoposition\n\n- Add ``\"geoposition\"`` to your ``INSTALLED_APPS`` setting::\n\n INSTALLED_APPS = (\n # \u2026\n \"geoposition\",\n )\n\n- Set your Google API key in you settings file::\n\n GEOPOSITION_GOOGLE_MAPS_API_KEY = 'YOUR_API_KEY'\n\n API keys may be obtained here: https://developers.google.com/maps/documentation/javascript/get-api-key\n\n- If you are still using Django <1.3, you are advised to install\n `django-staticfiles`_ for static file serving.\n\n\nUsage\n-----\n\n``django-geoposition`` comes with a model field that makes it pretty\neasy to add a geoposition field to one of your models. To make use of\nit:\n\n- In your ``myapp/models.py``::\n\n from django.db import models\n from geoposition.fields import GeopositionField\n\n class PointOfInterest(models.Model):\n name = models.CharField(max_length=100)\n position = GeopositionField()\n\n- This enables the following simple API::\n\n >>> from myapp.models import PointOfInterest\n >>> poi = PointOfInterest.objects.get(id=1)\n >>> poi.position\n Geoposition(52.522906,13.41156)\n >>> poi.position.latitude\n 52.522906\n >>> poi.position.longitude\n 13.41156\n\n\nForm field and widget\n---------------------\n\nAdmin\n^^^^^\n\nIf you use a ``GeopositionField`` in the admin it will automatically\nshow a `Google Maps`_ widget with a marker at the currently stored\nposition. You can drag and drop the marker with the mouse and the\ncorresponding latitude and longitude fields will be updated\naccordingly.\n\nIt looks like this:\n\n|geoposition-widget-admin|\n\n\nRegular Forms\n^^^^^^^^^^^^^\n\nUsing the map widget on a regular form outside of the admin requires\njust a little more work. In your template make sure that\n\n- `jQuery`_ is included\n- the static files (JS, CSS) of the map widget are included (just use\n ``{{ form.media }}``)\n\n**Example**::\n\n \n
\n\n\nSettings\n--------\n\nYou can customize the `MapOptions`_ and `MarkerOptions`_ used to initialize the\nmap and marker in JavaScript by defining ``GEOPOSITION_MAP_OPTIONS`` or\n``GEOPOSITION_MARKER_OPTIONS`` in your ``settings.py``.\n\n**Example**::\n\n GEOPOSITION_MAP_OPTIONS = {\n 'minZoom': 3,\n 'maxZoom': 15,\n }\n\n GEOPOSITION_MARKER_OPTIONS = {\n 'cursor': 'move'\n }\n\nPlease note that you cannot use a value like ``new google.maps.LatLng(52.5,13.4)``\nfor a setting like ``center`` or ``position`` because that would end up as a\nstring in the JavaScript code and not be evaluated. Please use\n`Lat/Lng Object Literals`_ for that purpose, e.g. ``{'lat': 52.5, 'lng': 13.4}``.\n\nYou can also customize the height of the displayed map widget by setting\n``GEOPOSITION_MAP_WIDGET_HEIGHT`` to an integer value (default is 480).\n\n\nLicense\n-------\n\n`MIT`_\n\n\n.. _PyPI: http://pypi.python.org/pypi/django-geoposition\n.. _django-staticfiles: http://github.com/jezdez/django-staticfiles\n.. _Google Maps: http://code.google.com/apis/maps/documentation/javascript/\n.. |geoposition-widget-admin| image:: docs/images/geoposition-widget-admin.jpg\n.. _jQuery: http://jquery.com\n.. _MIT: http://philippbosch.mit-license.org/\n.. _MapOptions: https://developers.google.com/maps/documentation/javascript/reference?csw=1#MapOptions\n.. _MarkerOptions: https://developers.google.com/maps/documentation/javascript/reference?csw=1#MarkerOptions\n.. _Lat/Lng Object Literals: https://developers.google.com/maps/documentation/javascript/examples/map-latlng-literal\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/philippbosch/django-geoposition", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-geoposition", "package_url": "https://pypi.org/project/django-geoposition/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-geoposition/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/philippbosch/django-geoposition" }, "release_url": "https://pypi.org/project/django-geoposition/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "Django model field that can hold a geoposition, and corresponding admin widget.", "version": "0.3.0" }, "last_serial": 2263569, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "bd172acd629bab11fd40ef234afdb588", "sha256": "7902d0338c0dda9eccd6da751e6bea181daebcb036a4497dd9fe30b8937fbbde" }, "downloads": -1, "filename": "django-geoposition-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bd172acd629bab11fd40ef234afdb588", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2822, "upload_time": "2011-04-04T16:07:58", "url": "https://files.pythonhosted.org/packages/04/e4/7f08cfef6033703a3ae457d8aa3bf6ca195ed9cc6cbd99bf120db726e4f6/django-geoposition-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7d64a814346422a50197f2ad121f232e", "sha256": "b6fbadfb5b2f4334863b6474c6a1cf8ff1c361994177374dfe29df8033cfefe1" }, "downloads": -1, "filename": "django-geoposition-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7d64a814346422a50197f2ad121f232e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 172064, "upload_time": "2011-04-04T16:21:14", "url": "https://files.pythonhosted.org/packages/c8/f7/8bc088b761de81bf464b96b1ab05b40669d242e604763878bb296d9968ab/django-geoposition-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2345364f6c00d4f2fda92fdc4cecb8a5", "sha256": "e414cf7e5d54dff12b8fbfebc84a5c88cc28c68fe77f7f96e5d479aaf59f3546" }, "downloads": -1, "filename": "django-geoposition-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2345364f6c00d4f2fda92fdc4cecb8a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 172690, "upload_time": "2011-04-15T17:51:29", "url": "https://files.pythonhosted.org/packages/24/e7/182aa197b6a389c9962a24f62f89890b42f7cc6e06b300fbf417a6f03f25/django-geoposition-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ecbc1b0ee7ad2b27153d2c981719b938", "sha256": "d5a29185c552145f934337362a6042de3cc5f0f9ae65c04eaead41d139af70d5" }, "downloads": -1, "filename": "django-geoposition-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ecbc1b0ee7ad2b27153d2c981719b938", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5312, "upload_time": "2011-06-12T11:42:48", "url": "https://files.pythonhosted.org/packages/bc/8e/4866892f7841479b9981909a95bd41b2a40677ef87e110d855fa235d66d9/django-geoposition-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "2ca39ce2752944d0a3a0ab43cb03c941", "sha256": "4b1e02a8fe46ab0b2e13fa57b0078977c7076933d82dcf2fdfae4a224cb2f381" }, "downloads": -1, "filename": "django-geoposition-0.1.4.tar.gz", "has_sig": false, "md5_digest": "2ca39ce2752944d0a3a0ab43cb03c941", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5237, "upload_time": "2012-05-02T10:56:44", "url": "https://files.pythonhosted.org/packages/06/05/fca29e29f5dc059c1e0a1d807a9c14fde7a5c3d695c2bf098bf5552b6670/django-geoposition-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "a3b536923c625c414c0e4dbf0dc07a3c", "sha256": "64bc00caf702797680529ba8507524f33d902360f4dbc1b6ec08d66690cfd15c" }, "downloads": -1, "filename": "django-geoposition-0.1.5.tar.gz", "has_sig": false, "md5_digest": "a3b536923c625c414c0e4dbf0dc07a3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5276, "upload_time": "2013-11-19T08:32:52", "url": "https://files.pythonhosted.org/packages/48/b6/3d34567df24c7893078f45a76bfaae9cd1f2e5e653b00f42faa74a30c9b5/django-geoposition-0.1.5.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3e86c7afd37e1277dd158d3ce7b11881", "sha256": "2c671baed334ca907e35b9806a3f0c599483bf9850b9968f205c3cd95a306d32" }, "downloads": -1, "filename": "django-geoposition-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3e86c7afd37e1277dd158d3ce7b11881", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11156, "upload_time": "2014-05-20T17:34:52", "url": "https://files.pythonhosted.org/packages/d8/d5/cfc2d7b52d3027f86db4c2678e508369dd271bdc15399f6c717bb6aff2c4/django-geoposition-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "b3f74c30eb71d7c282e516350f56010c", "sha256": "2788b1d49264b5fcdf924a86ead9053746b6ae9cd020b2352e22a50a30fc7b17" }, "downloads": -1, "filename": "django-geoposition-0.2.1.tar.gz", "has_sig": false, "md5_digest": "b3f74c30eb71d7c282e516350f56010c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10761, "upload_time": "2014-06-12T06:03:56", "url": "https://files.pythonhosted.org/packages/34/5d/d44b902a3dff2bec3dececf22eebea625fd414ded9201de8503ae1ef910c/django-geoposition-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "d19d402fafc7e91a73649e42a2d28aa9", "sha256": "92ffe9fa43f9a3cc935c05a230a7c95e4a183854204c645150ca60c1a7df7ebe" }, "downloads": -1, "filename": "django-geoposition-0.2.2.tar.gz", "has_sig": false, "md5_digest": "d19d402fafc7e91a73649e42a2d28aa9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11361, "upload_time": "2014-07-29T08:53:06", "url": "https://files.pythonhosted.org/packages/55/ba/add7aba7c95fd75d4ba72f2e62bcb908ac0864a645e4c1929396de4a01b1/django-geoposition-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "aee2f8d0792cae1b7e558702254d905d", "sha256": "3f17fd799c312bf584970d03e3c12ff595054270e964fd3a51b9a75273d23e50" }, "downloads": -1, "filename": "django-geoposition-0.2.3.tar.gz", "has_sig": false, "md5_digest": "aee2f8d0792cae1b7e558702254d905d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11649, "upload_time": "2016-06-28T21:49:06", "url": "https://files.pythonhosted.org/packages/e8/67/dd9201ec2289dd461c4c7be89eefbc978e069d427cc14b30cef324b958ed/django-geoposition-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "882d7bfa83005f61327c316dcbf0e0ce", "sha256": "26b6d74d3aa3cfd97cdaf19c82dc3228f0dd13d846514253478340b71db2882d" }, "downloads": -1, "filename": "django-geoposition-0.3.0.tar.gz", "has_sig": false, "md5_digest": "882d7bfa83005f61327c316dcbf0e0ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11813, "upload_time": "2016-08-05T07:21:06", "url": "https://files.pythonhosted.org/packages/f5/21/a77abcb4b7de4ca58cd579767c9ec0f12d7c546cb0fe3752274dfa1e437a/django-geoposition-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "882d7bfa83005f61327c316dcbf0e0ce", "sha256": "26b6d74d3aa3cfd97cdaf19c82dc3228f0dd13d846514253478340b71db2882d" }, "downloads": -1, "filename": "django-geoposition-0.3.0.tar.gz", "has_sig": false, "md5_digest": "882d7bfa83005f61327c316dcbf0e0ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11813, "upload_time": "2016-08-05T07:21:06", "url": "https://files.pythonhosted.org/packages/f5/21/a77abcb4b7de4ca58cd579767c9ec0f12d7c546cb0fe3752274dfa1e437a/django-geoposition-0.3.0.tar.gz" } ] }