django-geoposition icon indicating copy to clipboard operation
django-geoposition copied to clipboard

Map does not render in version django 1.11.

Open marlonleite opened this issue 7 years ago • 25 comments

After several tests, I realized that the map does not render in the version of django 1.11. Already in version 1.10 works perfectly.

marlonleite avatar May 07 '17 14:05 marlonleite

Faced with exactly the same problem. There is no js error, the map is not rendered, and there are no headings "latitude", "longitude"

vladimirmyshkovski avatar May 10 '17 10:05 vladimirmyshkovski

Seeing the same

wjdp avatar May 10 '17 14:05 wjdp

@marlonleite @narnikgamarnikus @wjdp I'm not currently using django-geoposition in a Django >1.9 project. Would one of you be able to provide a fix for this by any chance?

philippbosch avatar May 10 '17 14:05 philippbosch

Happy to take a look

wjdp avatar May 10 '17 14:05 wjdp

For those on 1.11 waiting for a release you can do pip install https://github.com/philippbosch/django-geoposition/archive/django-1.11.zip in the meantime

wjdp avatar May 24 '17 19:05 wjdp

@philippbosch Is there any blocker for merging those fixes into master and releasing the package?

Alexx-G avatar Jun 09 '17 11:06 Alexx-G

I am also facing the issue of map not rendering in admin page, django-1.11

AkhilLabGlo avatar Jun 20 '17 13:06 AkhilLabGlo

@AkhilLabGlo I'm using the version from django-1.11 branch as @wjdp pointed out. It would be nice to get a release, but it works as a temporary solution. Seems like the author doesn't use 1.11, so it's not a critical issue in his use cases. However, for most of my projects, I keep actual version of Django via incremental upgrades (not a lot of updates are needed usually), so it was a blocker for me.

Alexx-G avatar Jun 21 '17 19:06 Alexx-G

I also use django 1.11 and I'm having the same problem rendering the map, but I used the temporary solution above and it worked!

iang12 avatar Oct 07 '17 15:10 iang12

Hi. I am using pip-tools. How can I pin down the requirements.in? https://github.com/jazzband/pip-tools/issues/593

elcolie avatar Nov 12 '17 05:11 elcolie

Any updates about 1.11?

talbenbasat avatar Dec 22 '17 11:12 talbenbasat

It would be very nice to get a release if possible.

andrewmwilson avatar Jan 10 '18 04:01 andrewmwilson

map not rendering in django 2.0 how can i correct this

NgariC avatar May 02 '18 10:05 NgariC

@NgariC https://github.com/philippbosch/django-geoposition/issues/100

elcolie avatar May 02 '18 15:05 elcolie

Still not fixed. Django 1.11.6

andreyshipilov avatar Oct 09 '18 07:10 andreyshipilov

Any ETA for releasing a Django 1.11 compatible version? Thanks!

darccio avatar Oct 11 '18 14:10 darccio

Guys, it's been more than a year and this is still not fixed...

andreyshipilov avatar Oct 26 '18 03:10 andreyshipilov

As several others, I created a fork. My forks has support for Django 1.11 and 2.x from other forks and a minor fix to avoid django's Javascript global var conflicts: https://github.com/imdario/django-geoposition

darccio avatar Oct 26 '18 06:10 darccio

@imdario Your fork throws errors in admin. Have you tested it in 1.11?

super() takes at least 1 argument (0 given)

Over here: https://github.com/imdario/django-geoposition/blob/master/geoposition/widgets.py#L23

andreyshipilov avatar Oct 27 '18 00:10 andreyshipilov

I upgraded it to Django 2.x and I use Python 3.7. That's why you got this error. Maybe we can work out a compatible version with both versions. I'm sorry I forgot that this issue was about 1.11 compatibility. Actually, I was on Django 1.11 but I ended upgrading to the last version. Dario Castañé dario.im[1]

On Sat, Oct 27, 2018, at 02:43, Andrey Shipilov wrote:

@imdario[2] Your fork throws errors in admin. Have you tested it in 1.11?> image 2018-10-27 11 12 50

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[3], or mute the thread[4]. Links:

  1. https://dario.im/
  2. https://github.com/imdario
  3. https://github.com/philippbosch/django-geoposition/issues/83#issuecomment-433576960
  4. https://github.com/notifications/unsubscribe-auth/AAJ8wZ_uulY7hefAe9QUD_hloCsF09goks5uo6w6gaJpZM4NTKol

darccio avatar Oct 27 '18 06:10 darccio

@imdario Absolutely.

If you change:

context = super().get_context(name, value, attrs)

to Py2 style:

context = super(GeopositionWidget, self).get_context(name, value, attrs)

then voila. screen shot 2018-10-27 at 8 24 25 pm

andreyshipilov avatar Oct 27 '18 09:10 andreyshipilov

@andreyshipilov, fixed and released as v0.3.5.

darccio avatar Oct 28 '18 21:10 darccio

@imdario Awesome! Cheers mate :)

andreyshipilov avatar Oct 28 '18 21:10 andreyshipilov

Hi @imdario,

I'm using Django 2.0.9 and django-geoposition=0.3.0 and this widget doesn't work in Admin.

Can I ask you how can I install 0.3.5?

screen shot 2018-12-05 at 11 10 58

jvorcak avatar Dec 05 '18 10:12 jvorcak

@jvorcak, it looks I forgot to update the README in order to point to my own PyPI package: django-geoposition-2.

darccio avatar Dec 05 '18 11:12 darccio