Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to support Django 2.0 #103

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

Romamo
Copy link

@Romamo Romamo commented Mar 17, 2018

No description provided.

@Benbb96
Copy link

Benbb96 commented May 16, 2018

Thanks @Romamo , it worked for me on Django 2.0.3 👍

@abid-mehmood
Copy link

Thanks @Romamo , it worked for me too on Django 2.0.7 👍

@JoabMendes
Copy link

JoabMendes commented Sep 25, 2018

Thanks, @Romamo !!! It's working for me now with Django==2.1.1

For those who want to use Romamo's fix as a dependency, add this to your requirements.txt file:

-e git+https://github.com/Romamo/django-geoposition#egg=django-geoposition

@@ -33,7 +33,7 @@ if (jQuery != undefined) {
$mapContainer = $('<div class="geoposition-map" />'),
$addressRow = $('<div class="geoposition-address" />'),
$searchRow = $('<div class="geoposition-search" />'),
$searchInput = $('<input>', {'type': 'search', 'placeholder': 'Start typing an address …'}),
$searchInput = $('<input>', {'type': 'text', 'placeholder': 'Start typing an address …'}),
$latitudeField = $container.find('input.geoposition:eq(0)'),
$longitudeField = $container.find('input.geoposition:eq(1)'),
latitude = parseFloat($latitudeField.val()) || null,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the French people who want to use this library, the value of the $latitudeField will have a coma so I needed to replace by a dot like so latitude = parseFloat($latitudeField.val().replace(',', '.')). And do the same for the longitude.
Otherwise, the value was truncated to an integer.

@schlunsen
Copy link

schlunsen commented Jan 29, 2019

When will this be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants