Skip to content

Commit

Permalink
[Resolves GeoNode#7366] Upgrade to Django 3.2, fix requirements and P…
Browse files Browse the repository at this point in the history
…R comments
  • Loading branch information
mattiagiupponi committed Apr 23, 2021
1 parent c967272 commit 5ec05d7
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CACHE_BUSTING_STATIC_ENABLED=False
CACHE_BUSTING_MEDIA_ENABLED=False

MEMCACHED_ENABLED=False
MEMCACHED_BACKEND=django.core.cache.backends.memcached.MemcachedCache
MEMCACHED_BACKEND=django.core.cache.backends.memcached.PyMemcacheCache
MEMCACHED_LOCATION=127.0.0.1:11211
MEMCACHED_LOCK_EXPIRE=3600
MEMCACHED_LOCK_TIMEOUT=10
Expand Down
2 changes: 1 addition & 1 deletion .env_dev
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CACHE_BUSTING_STATIC_ENABLED=False
CACHE_BUSTING_MEDIA_ENABLED=False

MEMCACHED_ENABLED=False
MEMCACHED_BACKEND=django.core.cache.backends.memcached.MemcachedCache
MEMCACHED_BACKEND=django.core.cache.backends.memcached.PyMemcacheCache
MEMCACHED_LOCATION=127.0.0.1:11211
MEMCACHED_LOCK_EXPIRE=3600
MEMCACHED_LOCK_TIMEOUT=10
Expand Down
2 changes: 1 addition & 1 deletion .env_test
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CACHE_BUSTING_STATIC_ENABLED=False
CACHE_BUSTING_MEDIA_ENABLED=False

MEMCACHED_ENABLED=False
MEMCACHED_BACKEND=django.core.cache.backends.memcached.MemcachedCache
MEMCACHED_BACKEND=django.core.cache.backends.memcached.PyMemcacheCache
MEMCACHED_LOCATION=127.0.0.1:11211
MEMCACHED_LOCK_EXPIRE=3600
MEMCACHED_LOCK_TIMEOUT=10
Expand Down
3 changes: 0 additions & 3 deletions geonode/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ class BaseAppConfig(NotificationsAppConfigBase):
("request_resource_edit", _("Request resource change"),
_("Owner has requested permissions to modify a resource")),
)


default_app_config = 'geonode.base.BaseAppConfig'
2 changes: 1 addition & 1 deletion geonode/maps/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def test_map_embed(self, thumbnail_mock):
map_obj.update_from_viewer(config_map, context={})
title = config_map.get('title', config_map['about']['title'])
abstract = config_map.get('abstract', config_map['about']['abstract'])
center = config_map['map'].get('center', settings.DEFAULT_CONTENT_TYPE)
center = config_map['map'].get('center', {})
zoom = config_map['map'].get('zoom', settings.DEFAULT_MAP_ZOOM)

projection = config_map['map']['projection']
Expand Down
4 changes: 2 additions & 2 deletions geonode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@

# MEMCACHED EXAMPLE
# 'default': {
# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
# 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
# 'LOCATION': '127.0.0.1:11211',
# },

Expand Down Expand Up @@ -398,7 +398,7 @@
}

MEMCACHED_ENABLED = ast.literal_eval(os.getenv('MEMCACHED_ENABLED', 'False'))
MEMCACHED_BACKEND = os.getenv('MEMCACHED_BACKEND', 'django.core.cache.backends.memcached.MemcachedCache')
MEMCACHED_BACKEND = os.getenv('MEMCACHED_BACKEND', 'django.core.cache.backends.memcached.PyMemcacheCache')
MEMCACHED_LOCATION = os.getenv('MEMCACHED_LOCATION', '127.0.0.1:11211')
MEMCACHED_LOCK_EXPIRE = int(os.getenv('MEMCACHED_LOCK_EXPIRE', 3600))
MEMCACHED_LOCK_TIMEOUT = int(os.getenv('MEMCACHED_LOCK_TIMEOUT', 10))
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ install_requires =

# Contribs
xmltodict<0.12.1
inflection==0.3.1
inflection>=0.4.0
jdcal==1.4.1
mock<5.0.0
python-dateutil==2.8.1
Expand Down

0 comments on commit 5ec05d7

Please sign in to comment.