GithubHelp home page GithubHelp logo

django-cms / djangocms-googlemap Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 58.0 452 KB

django CMS Google Map is a set of plugins for django CMS that allow you to implement Google Map into your website.

Home Page: https://marketplace.django-cms.org/en/addons/browse/djangocms-googlemap/

License: Other

Python 74.72% HTML 7.42% JavaScript 17.87%
addon cms django django-cms python

djangocms-googlemap's Introduction

django CMS

Code Climate

Open source enterprise content management system based on the Django framework and backed by the non-profit django CMS Association (Sponsor us!).

Contribute to this project and win rewards

Because django CMS is a community-driven project, we welcome everyone to get involved in the project. Become part of a fantastic community and help us make django CMS the best open source CMS in the world.

Attention!

Please use the develop-4 branch as the target for pull requests for on-going development.

Security fixes will be backported to older branches by the core team as appropriate.

Features

  • hierarchical pages
  • extensive built-in support for multilingual websites
  • multi-site support
  • draft/publish workflows
  • version control
  • a sophisticated publishing architecture, that's also usable in your own applications
  • frontend content editing
  • a hierarchical content structure for nested plugins
  • an extensible navigation system that your own applications can hook into
  • SEO-friendly URLs
  • designed to integrate thoroughly into other applications

Developing applications that integrate with and take advantage of django CMS features is easy and well-documented.

More information on our website.

Requirements

See the Python/Django requirements for the current release version in our documentation.

See the installation how-to guide for an overview of some other requirements and dependencies of the current release.

Getting started

These tutorials take you step-by-step through some key aspects of django CMS.

Documentation

Our documentation working group maintains documentation for several versions of the project. Key versions are:

  • stable (default), for the current release version
  • latest, representing the latest build of the develop-4 branch

For more information about our branch policy, see Branches.

Our documentation is hosted courtesy of Read the Docs.

The dependencies for the docs are compiled by pip-tools.

Test django CMS in our demo

The demo platform is kindly provided by Divio, platinum member of the django CMS Association.

Try demo with Divio Cloud

Getting Help

Please head over to our Discord Server or Stackoverflow for support.

Professional support

Choose from a list of trusted tech partner of the django CMS Association to get your website project delivered successfully.

Choose a trusted web host for your django CMS project and get your website online today.

The django CMS Association

The django CMS Association is a non-profit organization that was founded in 2020 with the goal to drive the success of django CMS, by increasing customer happiness, market share and open-source contributions. We provide infrastructure and guidance for the django CMS project.

The non-profit django CMS Association is dependent on donations to fulfill its purpose. The best way to donate is to become a member of the association and pay membership fees. The funding will be funneled back into core development and community projects.

Join the django CMS Association.

Credits

djangocms-googlemap's People

Contributors

bittner avatar bplociennik avatar chive avatar czpython avatar danielfay avatar digi604 avatar dmytrolitvinov avatar finalangel avatar fsbraun avatar ivarsg avatar jsma avatar kese avatar lory87 avatar mkoistinen avatar narenderrajub avatar pure-zero avatar retailify avatar s-weigand avatar skirsdeda avatar stefanfoulis avatar vthaian avatar vxsx avatar yakky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

djangocms-googlemap's Issues

form GoogleMapForm needs updating (RemovedInDjango18Warning)

C:\Python27\lib\site-packages\djangocms_googlemap\forms.py:14: RemovedInDjango18Warning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form GoogleMapForm needs updating
class GoogleMapForm(ModelForm):

Django Compressor

This plugin is great but its automatically adding incompressible files to my js block which is causing a server error when compression is enabled. Is there an easy way to override this?

Issue with djangocms_googlemap_0005 migration: no such column

For some very peculiar reason, the migration for djangocms_googlemap is failing and preventing a project from making it's way to production. First I copied over all dependencies, pip installed everything, ran ./manage.py makemigrations && ./manage.py migrate

The migration runs until it hits djangocms_googlemap.0005_create_nested_plugins

at which point I receive an error that states: django.db.utils.OperationalError: no such column: icon_id
Stack Trace is attached.
stacktrace.txt

Two maps on same page

Hi,

I have problems displaying two Maps on the same page. The DOM is properly rendered for each plugin, but the googlemaps API breaks with the error-message:

k[Jc].maps.Load is not a function

Probably because the API is loaded twice. Undoing the changes from PR #5 solves the issue.

Sebastian

Maps stopped working after update

After this update #5 I started receiving this error, which prevents showing maps:
Uncaught TypeError: Cannot read property 'appendChild' of null
This exception is thrown in downloaded google js file (https://maps-api-ssl.google.com/...) on line:
document.body.appendChild(s);
because document.body is still null.
I am testing with a single map on a page.

Tests should not be installed

--- setup.py.orig	2018-11-20 18:13:56.000000000 +0000
+++ setup.py
@@ -40,7 +40,7 @@ setup(
     license='BSD',
     description='Adds Google Maps plugins to django CMS.',
     long_description=open('README.rst').read(),
-    packages=find_packages(),
+    packages=find_packages(exclude=['tests']),
     include_package_data=True,
     zip_safe=False,
     install_requires=REQUIREMENTS,

installation error

I'm trying to install via putty and, after succesfully running the pip install and adding 'djangocms-googlemap', to the list in mysite/settings.py, I run

python manage.py migrate djangocms_googlemap

and get the following:

Traceback (most recent call last):
  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/root/treesite/myvenv/lib/python3.5/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/root/treesite/myvenv/lib/python3.5/site-packages/django/core/management/__init__.py", line 357, in execute
    django.setup()
  File "/root/treesite/myvenv/lib/python3.5/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/root/treesite/myvenv/lib/python3.5/site-packages/django/apps/registry.py", line 89, in populate
    app_config = AppConfig.create(entry)
  File "/root/treesite/myvenv/lib/python3.5/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'djangocms_googlemap'

Chrome modal problem

When the Google Map plugin exists on the page, after opening any modal window if the page is/was scrolled down, modal window is wiped out as shown in the attachment. This happens only in Chrome. issue

whoosh search error

I am getting the following error while trying to rebuild search index using haystack and whoosh

File "/home/kvint/phch/venv/lib/python3.5/site-packages/djangocms_googlemap/cms_plugins.py", line 90, in get_render_template
return 'djangocms_googlemap/{}/marker.html'.format(context['googlemap_template'])
KeyError: 'googlemap_template'

Django CMS requirements

Hi,

I have been using Django CMS 3.2 on the Aldryn platform and the djangocms-googlemap is pulled automatically.

Latest update breaks my deployment as it forces minimal Django CMS version to 3.3, and I am running on 3.2.

Zoom level ignored

Tried to set different values, but plugin always sets maximum zoom.
Few months ago everything was ok.
gmap

Default Geo Location and Zoom level is ignored if one or Marker are used

djangocms-googlemap==2.2.0
django-cms==3.11.5

You can set the default view of the map, in this case the center point of the USA with zoom level 5.

CleanShot 2024-02-26 at 13 16 07@2x

But as soon as you set a marker, this the center point is ignored and the map canvas spans around the marker.

CleanShot 2024-02-26 at 13 18 36@2x

If you add more marker, the map spans around all of them, the zoom level is ignored.

CleanShot 2024-02-26 at 13 23 46@2x

Is this a regression of #73?

Fields missing after migration

If migrating from plugin that was integrated in django cms the table is renamed, but new fields are missing. Prior to renaming table, migration should probably create those new fields i.e.:

db.add_column(u'cmsplugin_googlemap', 'info_window', self.gf('django.db.models.fields.BooleanField')(default=True))
db.add_column(u'cmsplugin_googlemap', 'scrollwheel', self.gf('django.db.models.fields.BooleanField')(default=True))
db.add_column(u'cmsplugin_googlemap', 'double_click_zoom', self.gf('django.db.models.fields.BooleanField')(default=True))
db.add_column(u'cmsplugin_googlemap', 'draggable', self.gf('django.db.models.fields.BooleanField')(default=True))
db.add_column(u'cmsplugin_googlemap', 'keyboard_shortcuts', self.gf('django.db.models.fields.BooleanField')(default=True))
db.add_column(u'cmsplugin_googlemap', 'pan_control', self.gf('django.db.models.fields.BooleanField')(default=True))
db.add_column(u'cmsplugin_googlemap', 'zoom_control', self.gf('django.db.models.fields.BooleanField')(default=True))
db.add_column(u'cmsplugin_googlemap', 'street_view_control', self.gf('django.db.models.fields.BooleanField')(default=True))

Table djangocms_googlemap_googlemap doesn't exist

I'm attempting to upgrade from cms 2.4 and am getting this error when running migrations for the new djangocms-googlemap app:
DatabaseError: (1146, "Table 'madison.djangocms_googlemap_googlemap' doesn't exist")

Full traceback:

Running migrations for djangocms_googlemap:
 - Migrating forwards to 0001_initial.
 > djangocms_googlemap:0001_initial
FailedDryRun:  ! Error found during dry run of '0001_initial'! Aborting.
Traceback (most recent call last):
  File "/Users/jordan/Development/madison/venv/lib/python2.7/site-packages/south/migration/migrators.py", line 173, in _run_migration
    migration_function()
  File "/Users/jordan/Development/madison/venv/lib/python2.7/site-packages/south/migration/migrators.py", line 62, in <lambda>
    return (lambda: direction(orm))
  File "/Users/jordan/Development/madison/venv/lib/python2.7/site-packages/djangocms_googlemap/migrations/0001_initial.py", line 23, in forwards
    description = connection.introspection.get_table_description(connection.cursor(), 'djangocms_googlemap_googlemap')
  File "/Users/jordan/Development/madison/venv/lib/python2.7/site-packages/django/db/backends/mysql/introspection.py", line 49, in get_table_description
    cursor.execute("SELECT * FROM %s LIMIT 1" % self.connection.ops.quote_name(table_name))
  File "/Users/jordan/Development/madison/venv/lib/python2.7/site-packages/django/db/backends/util.py", line 41, in execute
    return self.cursor.execute(sql, params)
  File "/Users/jordan/Development/madison/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 130, in execute
    six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])
  File "/Users/jordan/Development/madison/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 120, in execute
    return self.cursor.execute(query, args)
  File "/Users/jordan/Development/madison/venv/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/Users/jordan/Development/madison/venv/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
DatabaseError: (1146, "Table 'madison.djangocms_googlemap_googlemap' doesn't exist")

Conflicting migrations detected; multiple leaf nodes in the migration graph

Hi,

I'm trying to upgrade djangocms-googlemaps from v. 0.5.1 to the last one. When I launch python manage.py migrate I get the error:

CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0008_removed_null_fields, 0003_auto_20161115_0927 in djangocms_googlemap). To fix them run 'python manage.py makemigrations --merge'

Here my showmigrations:

djangocms_googlemap
[X] 0001_initial
[X] 0002_auto_20160622_1031
[X] 0003_auto_20161115_0927
[ ] 0003_auto_20160825_1829
[ ] 0004_adapted_fields
[ ] 0005_create_nested_plugins
[ ] 0006_remove_fields
[ ] 0007_reset_null_values
[ ] 0008_removed_null_fields

the double 0003 migration is strange...

Any suggestion?

Thank you
Fabrizio

Easy_thumbnails app seems mandatory in Django 1.11

When i tried to install and then migrate the djangocms-googlemap i got an error

RuntimeError: Model class easy_thumbnails.models.Source doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

Then i just add the line below

INSTALLED_APPS = [
 ...
'easy_thumbnails',
...]

and then everything it works fine. It seems that easy_thumbnails app is mandatory.

does not work on german pages

In my current multi-lingual project this plugin only works on english pages. For some reason it uses the german convention to display floating numbers in the actual source code, which of course does not work:

_djangocms_googlemap_mapsToInitialize[3600] = {
    ...
    lat: 0,000001,
    ...
}

leads to a SyntaxError: missing : after property id
it should be dot instead of comma, which it is on the english pages:

lat: 0.000001

OpenStreetMap

Are you planning or do you want to also provide a plugin for OpenStreetMap? As django cms is used by many opensource projects I'm sure there will be many users of this OSM Plugin.

[Question] Limit Markers via select and redraw map

Hi, I've used DjangoCMS Forms to add 2 fields and a button as in the image.

image

My idea is to programmatically populate the Marker table via the model when a new Item and Location is added. (Storing the slug in the Marker InfoWindow Content.)

Here's my model:

class Items(models.Model):
    user = models.ForeignKey(User, related_name='proprietor', blank=True, null=True)
    title = models.CharField(max_length=50, db_index=True)
    slug = models.SlugField(max_length=200, db_index=True)
    descripcion = models.TextField(blank=True, null=True)
    imagen = models.ImageField(upload_to='media')
    location = PlacesField(blank=True, )

So when the user presses Buscar, I want to select GoogleMapMarker where info_content like "%"+ +"%" and then redraw the map limited to those results.

Can you point me in the right direction to accomplish this?

lat/lng incorrect for locales not using point as decimal separator

Hello,

the values of lat/lng data-attributes should be forcibly output unlocalized in the according templates, since not all locales (e.g. german) use a period as decimal separator. (and values get incorrectly parsed as integers if a comma is used.)

fortunately this can be simply achieved by appling a stringformat filter like this.

data-lat="{{ instance.lat|stringformat:"f" }}"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.