All Projects → oscarmcm → Django Places

oscarmcm / Django Places

Licence: mit
A django app for store places with autocomplete

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Places

geocoder
Geocoder is a Typescript library which helps you build geo-aware applications by providing a powerful abstraction layer for geocoding manipulations
Stars: ✭ 28 (-49.09%)
Mutual labels:  autocomplete, google-maps, geolocation
GoogleMapsHelper
An easy to integrate Model Based Google Maps Helper (SVHTTPClient, AFNetworking) That lets you Geo Code , Reverse Geocode, Get Directions , Places Autocomplete.
Stars: ✭ 21 (-61.82%)
Mutual labels:  autocomplete, google-maps
svelte-mapbox
MapBox Map and Autocomplete components for Svelte (or Vanilla JS)
Stars: ✭ 267 (+385.45%)
Mutual labels:  autocomplete, google-maps
trackanimation
Track Animation is a Python 2 and 3 library that provides an easy and user-adjustable way of creating visualizations from GPS data.
Stars: ✭ 74 (+34.55%)
Mutual labels:  google-maps, geolocation
Django Autocomplete Light
A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
Stars: ✭ 1,559 (+2734.55%)
Mutual labels:  django, autocomplete
Sugardough
A web application template based on Django.
Stars: ✭ 173 (+214.55%)
Mutual labels:  django, cookiecutter
svelte-googlemaps
Svelte Google Maps Components
Stars: ✭ 62 (+12.73%)
Mutual labels:  google-maps, geolocation
Cookiecutter Django Vue
Cookiecutter Django Vue is a template for Django-Vue projects.
Stars: ✭ 462 (+740%)
Mutual labels:  django, cookiecutter
Googleapi
C# .NET Core Google Api (Maps, Places, Roads, Search, Translate). Supports all endpoints and requests / responses.
Stars: ✭ 346 (+529.09%)
Mutual labels:  geolocation, autocomplete
ionic3-google-maps-examples
Some examples of how to use google maps javascript API on a Ionic application and use HTML5 geolocation.
Stars: ✭ 24 (-56.36%)
Mutual labels:  google-maps, geolocation
Wagtail Pipit
Pipit is a Wagtail CMS boilerplate which aims to provide an easy and modern developer workflow with a React-rendered frontend.
Stars: ✭ 109 (+98.18%)
Mutual labels:  django, cookiecutter
Leku
🌍 Map location picker component for Android. Based on Google Maps. An alternative to Google Place Picker.
Stars: ✭ 612 (+1012.73%)
Mutual labels:  geolocation, google-maps
Wildfish Django Starter
Django 2 cookiecutter starter project template.
Stars: ✭ 93 (+69.09%)
Mutual labels:  django, cookiecutter
Cookiecutter Django Vue Graphql Aws
A highly opinionated Cookiecutter template that fuses together Django, Vue.js, GraphQL, and AWS into one full-stack web application.
Stars: ✭ 213 (+287.27%)
Mutual labels:  django, cookiecutter
Django Project Template
Thorgate's Django project template - Django, React, Sass, optional Docker and more
Stars: ✭ 91 (+65.45%)
Mutual labels:  django, cookiecutter
Wemake Django Template
Bleeding edge django template focused on code quality and security.
Stars: ✭ 1,141 (+1974.55%)
Mutual labels:  django, cookiecutter
Airbnb Android Google Map View
This is a sample Android Application which has Google Map view similar to what AirBnb Android Application. Moving Markers like Uber/Ola. Custom Google Search for places. Recycler view with Animations added.
Stars: ✭ 175 (+218.18%)
Mutual labels:  google-maps, autocomplete
Track Ip
Advanced Ip Tracker Tool
Stars: ✭ 150 (+172.73%)
Mutual labels:  geolocation, google-maps
Geolocator-2
Learn how to find and work with locations in Django, the Yelp API, and Google Maps api.
Stars: ✭ 24 (-56.36%)
Mutual labels:  google-maps, geolocation
Places
🌐 Turn any <input> into an address autocomplete
Stars: ✭ 5,322 (+9576.36%)
Mutual labels:  geolocation, autocomplete

django-places

A Django app for store places with autocomplete function and a related map to the selected place.

Badges

PyPI Travis-ci Codacy Badge

Quickstart

Install dj-places and add it to your installed apps:

$ pip install dj-places

INSTALLED_APPS = (
	...
	'places',
	...
)

Add the following settings and maps api key ( read more here ):

PLACES_MAPS_API_KEY='YourAwesomeUltraSecretKey'
PLACES_MAP_WIDGET_HEIGHT=480
PLACES_MAP_OPTIONS='{"center": { "lat": 38.971584, "lng": -95.235072 }, "zoom": 10}'
PLACES_MARKER_OPTIONS='{"draggable": true}'

Then use it in a project:

from django.db import models
from places.fields import PlacesField


class MyLocationModel(models.Model):
    location = PlacesField()

This enables the following API:

    >>> from myapp.models import ModelName
    >>> poi = ModelName.objects.get(id=1)
    >>> poi.position
    Place('Metrocentro, Managua, Nicaragua', 52.522906, 13.41156)
    >>> poi.position.place
    'Metrocentro, Managua, Nicaragua'
    >>> poi.position.latitude
    52.522906
    >>> poi.position.longitude
    13.41156

For using outside the Django Admin:

<form method="post">
    {% csrf_token %}
    {{ form.as_p }}
    <input type="submit" value="Save">
    {{ form.media }}
</form>

Remember to add the {{ form.media }} in your template.

Demo

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_test.txt
(myenv) $ python runtests.py

Credits

Tools used in rendering this package:

Similar Projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].