神刀安全网

Django-places store places with autocomplete and a related map

django-places

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

Badges

Django-places store places with autocomplete and a related map Django-places store places with autocomplete and a related map Django-places store places with autocomplete and a related map

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') 

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 toHelmy Giacoman for motivating me to make this package.

Tools used in rendering this package:

Similar Projects

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Django-places store places with autocomplete and a related map

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址