Skip to main content

A django app for store places

Project description

django-places
=============================

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

Badges
---------

[![PyPI](https://badge.fury.io/py/dj-places.png)](https://badge.fury.io/py/dj-places)
[![Travis-ci](https://travis-ci.org/oscarmcm/django-places.png?branch=master)](https://travis-ci.org/oscarmcm/django-places)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d6433fc7fc384f63b9f41fc251ee70b1)](https://www.codacy.com/app/om-cortez-2010/django-places?utm_source=github.com&utm_medium=referral&utm_content=oscarmcm/django-places&utm_campaign=Badge_Grade)

Quickstart
----------

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

$ pip install dj-places

INSTALLED_APPS = (
...
'djplaces',
...
)

Add in your project settings the following values:

JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'
GEOCOMPLETE_URL = '//cdnjs.cloudflare.com/ajax/libs/geocomplete/1.7.0/jquery.geocomplete.min.js'
GOOGLE_PLACES_URL = '//maps.googleapis.com/maps/api/js?libraries=places'


Then use it in a project:

from djplaces.fields import LocationField
place = models.CharField(max_length=250)
location = LocationField(base_field='place')

Demo
------

![](http://g.recordit.co/hZabhhYLHS.gif)

TODO-LIST
--------

* [ ] Write some test ASAP!
* [ ] Support Inline Admin
* [ ] Use Django Admin Jquery
* [ ] Set custom zoom map value
* [ ] Custom property for lat and lng values

Running Tests
--------------

Does the code actually work?

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

Credits
---------

Special thanks to [Helmy Giacoman](https://github.com/eos87) for motivating me to make this package.

Tools used in rendering this package:

* [Cookiecutter](https://github.com/audreyr/cookiecutter)
* [cookiecutter-djangopackage](https://github.com/pydanny/cookiecutter-djangopackage)
* [jquery-geocomplete](https://github.com/ubilabs/geocomplete)

Similar Projects
------------

* [Django Location Field](https://github.com/caioariede/django-location-field)
* [Django Geoposition](https://github.com/philippbosch/django-geoposition)


# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [v1.0.3](https://github.com/oscarmcm/django-places/tree/v1.0.3) (2016-06-01)
[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.0.2...v1.0.3)

**Fixed bugs:**

- i18n support [\#3](https://github.com/oscarmcm/django-places/issues/3)

## [v1.0.2](https://github.com/oscarmcm/django-places/tree/v1.0.2) (2016-05-12)
[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.0.1...v1.0.2)

## [v1.0.1](https://github.com/oscarmcm/django-places/tree/v1.0.1) (2016-05-12)
[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.0.0...v1.0.1)

**Fixed bugs:**

- Geocomplete is not a function [\#1](https://github.com/oscarmcm/django-places/issues/1)

**Merged pull requests:**

- Fixes \#1 Geocomplete is not a function [\#2](https://github.com/oscarmcm/django-places/pull/2) ([oscarmcm](https://github.com/oscarmcm))

## [v1.0.0](https://github.com/oscarmcm/django-places/tree/v1.0.0) (2016-04-28)

- First release on [PyPI.](https://pypi.python.org/pypi/dj-places)

Project details


Download files

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

Source Distribution

dj-places-1.0.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dj_places-1.0.3-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dj-places-1.0.3.tar.gz.

File metadata

  • Download URL: dj-places-1.0.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dj-places-1.0.3.tar.gz
Algorithm Hash digest
SHA256 99ea6c6168896d2d7c054a92a0d72cf47f756d6c8c59f230c6275547bfc8c430
MD5 627d6985e89d435efb12bccdc0e11735
BLAKE2b-256 35e111f977d3131880e373e6cfc3171767758c91eead90ef95527585279e9623

See more details on using hashes here.

File details

Details for the file dj_places-1.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dj_places-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7d6d40909c346072057e8d5cbb51c1baa7f7a50ef29a2997dc67e458899f7085
MD5 4435cafeaeecdd051e19268b12f930ff
BLAKE2b-256 87e227cda42575de7d463f0b2250490ba3b311d90dfe660949409b83206c96c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page