-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
1,619 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
######################################################################### | ||
# | ||
# Copyright (C) 2020 OSGeo | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
######################################################################### | ||
from django.urls import re_path | ||
|
||
from . import views | ||
|
||
js_info_dict = { | ||
"packages": ("geonode.base",), | ||
} | ||
|
||
urlpatterns = [ | ||
# 'geonode.resourcebases.views', | ||
re_path(r"^(?P<resourcebaseid>\d+)/metadata$", views.resourcebase_metadata, name="resourcebase_metadata"), | ||
re_path( | ||
r"^(?P<resourcebaseid>[^/]*)/metadata_detail$", | ||
views.resourcebase_metadata_detail, | ||
name="resourcebase_metadata_detail", | ||
), | ||
re_path( | ||
r"^(?P<resourcebaseid>\d+)/metadata_advanced$", | ||
views.resourcebase_metadata_advanced, | ||
name="resourcebase_metadata_advanced", | ||
), | ||
re_path( | ||
r"^(?P<resourcebaseid>[^/]+)/embed$", | ||
views.resourcebase_embed, | ||
{"template": "base/base_embed.html"}, | ||
name="resourcebase_embed", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import logging | ||
from django.conf import settings | ||
|
||
DEFAULT_COMMAND_LOGGER_NAME = "geonode.commands" | ||
|
||
|
||
def setup_logger(logger_name=DEFAULT_COMMAND_LOGGER_NAME, formatter_name="command", handler_name="command"): | ||
if logger_name not in settings.LOGGING["loggers"]: | ||
format = "%(levelname)-7s %(asctime)s %(message)s" | ||
|
||
settings.LOGGING["formatters"][formatter_name] = { | ||
"format": format | ||
} | ||
settings.LOGGING["handlers"][handler_name] = { | ||
"level": "DEBUG", | ||
"class": "logging.StreamHandler", | ||
"formatter": formatter_name | ||
} | ||
settings.LOGGING["loggers"][logger_name] = { | ||
"handlers": [handler_name], | ||
"level": "INFO", | ||
"propagate": False | ||
} | ||
|
||
handler = logging.StreamHandler() | ||
handler.setFormatter(logging.Formatter(fmt=format)) | ||
handler.setLevel(logging.DEBUG) | ||
|
||
logger = logging.getLogger(logger_name) | ||
logger.addHandler(handler) | ||
logger.setLevel(logging.INFO) | ||
logger.propagate = False | ||
|
||
return logger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% load i18n %} | ||
{% load base_tags %} | ||
{% load client_lib_tags %} | ||
|
||
{% block head %} | ||
|
||
<style> | ||
#paneltbar { | ||
margin-top: 90px !important; | ||
} | ||
</style> | ||
|
||
{% get_resourcebase_embed %} | ||
{% endblock %} |
Oops, something went wrong.