Skip to content

Commit

Permalink
Merge pull request #39 from cartologic/upgradePy3
Browse files Browse the repository at this point in the history
Upgarde to Python 3 & Django 2.2 (GeoNode 3)
  • Loading branch information
ahmednoureldeen committed Jul 19, 2020
2 parents 9b4c285 + 361ecdf commit 379b0de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 0 additions & 5 deletions context_processors.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)

from builtins import *
from django.conf import settings
from future import standard_library

Expand Down
2 changes: 1 addition & 1 deletion templatetags/basic_viewer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django import template
from django.core.urlresolvers import reverse
from django.urls import reverse
import json
register = template.Library()

Expand Down
8 changes: 4 additions & 4 deletions views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import base64
import json

from django.conf.urls import url
from django.urls import path
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.http import JsonResponse
from django.utils.decorators import method_decorator
Expand Down Expand Up @@ -191,13 +191,13 @@ def map_thumbnail(self, request, mapid):
def get_url_patterns(self):
urls = super(BasicViewer, self).get_url_patterns()
urls += [
url(r'^(?P<layername>[^/]*)/view/$',
path('<str:layername>/view/',
self.layer_view,
name='%s.layer.view' % self.app_name),
url(r'^(?P<mapid>\d+)/thumbnail$',
path('<int:mapid>/thumbnail/',
self.map_thumbnail,
name='%s_map_thumbnail' % self.app_name),
url(r'^legends$',
path('legends',
self.get_layers_legend,
name='%s_layers_legend' % self.app_name),
]
Expand Down

0 comments on commit 379b0de

Please sign in to comment.