{"id":19332598,"url":"https://github.com/oscarmcm/django-places","last_synced_at":"2025-04-10T03:51:10.337Z","repository":{"id":7992559,"uuid":"46950498","full_name":"oscarmcm/django-places","owner":"oscarmcm","description":"A django app for store places with autocomplete","archived":false,"fork":false,"pushed_at":"2024-01-31T07:47:25.000Z","size":98,"stargazers_count":73,"open_issues_count":4,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T12:07:55.252Z","etag":null,"topics":["autocomplete","autocompletion","cookiecutter","django","geolocation","google-maps","google-maps-api","python"],"latest_commit_sha":null,"homepage":"http://oscarmcm.github.io/django-places/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oscarmcm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-26T23:19:43.000Z","updated_at":"2024-12-16T16:01:23.000Z","dependencies_parsed_at":"2024-06-12T16:06:12.272Z","dependency_job_id":"a95e6fa8-365e-4a8a-9c96-0f543d4395c8","html_url":"https://github.com/oscarmcm/django-places","commit_stats":{"total_commits":48,"total_committers":7,"mean_commits":6.857142857142857,"dds":0.125,"last_synced_commit":"b91cf407070485a0569dcd9ecfbd5319e3271b0e"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarmcm%2Fdjango-places","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarmcm%2Fdjango-places/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarmcm%2Fdjango-places/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarmcm%2Fdjango-places/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oscarmcm","download_url":"https://codeload.github.com/oscarmcm/django-places/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922248,"owners_count":20855345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocomplete","autocompletion","cookiecutter","django","geolocation","google-maps","google-maps-api","python"],"created_at":"2024-11-10T02:46:47.798Z","updated_at":"2025-04-03T02:11:42.481Z","avatar_url":"https://github.com/oscarmcm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [django-places](https://pypi.org/project/dj-places/)\n\n[![PyPI](https://badge.fury.io/py/dj-places.png)](https://badge.fury.io/py/dj-places)\n\nA Django app for store places with autocomplete function and a related map to the selected place.\n\n## Quickstart\n----------\n\nInstall `dj-places` and add it to your installed apps:\n\n```\n$ pip install dj-places\n```\n\n```\n    INSTALLED_APPS = (\n    \t...\n    \t'places',\n    \t...\n    )\n```\n\nAdd the following settings and maps api key ([read more here](https://developers.google.com/maps/documentation/javascript/reference/map)):\n\n```python\nPLACES_MAPS_API_KEY='YourAwesomeUltraSecretKey'\nPLACES_MAP_WIDGET_HEIGHT=480\nPLACES_MAP_OPTIONS='{\"center\": { \"lat\": 38.971584, \"lng\": -95.235072 }, \"zoom\": 10}'\nPLACES_MARKER_OPTIONS='{\"draggable\": true}'\n```\n\n## Usage\n--------\n\nThen use it in a project:\n\n```python\nfrom django.db import models\nfrom places.fields import PlacesField\n\n\nclass MyLocationModel(models.Model):\n    location = PlacesField()\n\n```\n\nThis enables the following API:\n\n```python\n    \u003e\u003e\u003e from myapp.models import ModelName\n    \u003e\u003e\u003e poi = ModelName.objects.get(id=1)\n    \u003e\u003e\u003e poi.position\n    Place('Metrocentro, Managua, Nicaragua', 52.522906, 13.41156)\n    \u003e\u003e\u003e poi.position.place\n    'Metrocentro, Managua, Nicaragua'\n    \u003e\u003e\u003e poi.position.latitude\n    52.522906\n    \u003e\u003e\u003e poi.position.longitude\n    13.41156\n```\n\nFor using outside the Django Admin:\n\n```html\n\u003cform method=\"post\"\u003e\n    {% csrf_token %}\n    {{ form.as_p }}\n    \u003cinput type=\"submit\" value=\"Save\"\u003e\n    {{ form.media }}\n\u003c/form\u003e\n```\nRemember to add the `{{ form.media }}` in your template.\n\n## Demo\n------\n\n![](http://g.recordit.co/LheQH0HDMR.gif)\n\n### Credits\n---------\n\nTools used in rendering this package:\n\n*  [Cookiecutter](https://github.com/audreyr/cookiecutter)\n*  [cookiecutter-djangopackage](https://github.com/pydanny/cookiecutter-djangopackage)\n*  [jquery-geocomplete](https://github.com/ubilabs/geocomplete) (_no longer used in the project._)\n\n### Similar Projects\n------------\n\n*  [Django Location Field](https://github.com/caioariede/django-location-field)\n*  [Django GeoPosition](https://github.com/philippbosch/django-geoposition)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarmcm%2Fdjango-places","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foscarmcm%2Fdjango-places","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarmcm%2Fdjango-places/lists"}