mishbahr / djangocms-gmaps

The easiest way to embed Google Maps for your django-cms powered site. This is a great way to display the location of your business or event.
https://pypi.python.org/pypi/djangocms-gmaps/
BSD 3-Clause "New" or "Revised" License
22 stars 9 forks source link

'module' object has no attribute 'quote_plus' when adding a location #1

Closed Luis-Palacios closed 9 years ago

Luis-Palacios commented 9 years ago

Hey there, i am trying this plugin, i am able to add the plugin but when i add a location it crash and says ''module' object has no attribute 'quote_plus' when adding a location'

I am using django 1.7.5 and django-cms 3.0.12

mishbahr commented 9 years ago

Hi,

Thanks for taking the time to report this bug. I'll need some time to investigate this issue and I'll try to push a fix as soon as possible. In the mean time, could you please let me know the version of python you are using.

Many Thanks

mishbahr commented 9 years ago

Try this! Install directly from github.. Let me know if this fixes your issue. I'll push it PyPi after confirmation from you

Luis-Palacios commented 9 years ago

looks like it has to do with my python version(3.4) i was doing some debbuging and acordin to this

The urllib module has been split into parts and renamed in Python 3 to urllib.request, urllib.parse, and urllib.error. The 2to3 tool will automatically adapt imports when converting your sources to Python 3. Also note that the urllib.request.urlopen() function in Python 3 is equivalent to urllib2.urlopen() and that urllib.urlopen() has been removed.

so if i change the line 172 in models.py from this: 'address': urllib.quote_plus(self.address) to this 'address': urllib.parse.quote_plus(self.address) it works just fine.

just added .parse after urlib

mishbahr commented 9 years ago

Yep. I've fixed that now. Please try the github version.

Luis-Palacios commented 9 years ago

I am getting TemplateDoesNotExist at // djangocms_gmaps/infowindow.html when installing from github

mishbahr commented 9 years ago

Hmm... not sure why you getting that error. I've pushed the latest change to pypi. Please install the latest version .. the issue should be fixed.

Luis-Palacios commented 9 years ago

i am still getting the TemplateDoesNotExist error do i have to do something else to uninstall the package? because all i did was pip uninstall, and i had already ran the migrations the firstime

Luis-Palacios commented 9 years ago

Ok its working, i had to restar server. Sorry about that, and thank you for your quick response