forked from geosolutions-it/geonode-mapstore-client
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Alessio Fabiani
authored
Feb 23, 2021
1 parent
2702acc
commit b08a8f3
Showing
46 changed files
with
2,741 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Authors | ||
======= | ||
|
||
Alessio Fabiani | ||
|
||
Contributors | ||
============ |
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,108 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
# This file is distributed under the same license as the PACKAGE package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2021-01-22 12:32+0100\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"Language: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
#: mapstore2_adapter/api/models.py:74 | ||
msgid "String" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/api/models.py:75 | ||
msgid "Number" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/api/models.py:76 | ||
msgid "Integer" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/api/models.py:77 | ||
msgid "Boolean" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/api/models.py:78 | ||
msgid "Binary" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/apps.py:30 | ||
msgid "Django MapStore2 Adapter" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/apps.py:28 | ||
msgid "MapStore2 Geonode Apps Plugins" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:32 | ||
msgid "GeoStory Created" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:32 | ||
msgid "A GeoStory was created" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:33 | ||
msgid "GeoStory Updated" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:33 | ||
msgid "A GeoStory was updated" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:34 | ||
msgid "GeoStory Approved" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:34 | ||
msgid "A GeoStory was approved by a Manager" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:35 | ||
msgid "GeoStory Published" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:35 | ||
msgid "A GeoStory was published" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:36 | ||
msgid "GeoStory Deleted" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:36 | ||
msgid "A GeoStory was deleted" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:37 | ||
msgid "Comment on GeoStory" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:37 | ||
msgid "A GeoStory was commented on" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:38 | ||
msgid "Rating for GeoStory" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:38 | ||
msgid "A rating was given to a GeoStory" | ||
msgstr "" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/models.py:36 | ||
#, python-format | ||
msgid "%s Type" | ||
msgstr "" |
Binary file not shown.
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,108 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
# This file is distributed under the same license as the PACKAGE package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: \n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2021-01-22 12:32+0100\n" | ||
"PO-Revision-Date: 2021-01-22 12:36+0100\n" | ||
"Language: it\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"X-Generator: Poedit 2.4.2\n" | ||
|
||
#: mapstore2_adapter/api/models.py:74 | ||
msgid "String" | ||
msgstr "Stringa" | ||
|
||
#: mapstore2_adapter/api/models.py:75 | ||
msgid "Number" | ||
msgstr "Numero" | ||
|
||
#: mapstore2_adapter/api/models.py:76 | ||
msgid "Integer" | ||
msgstr "Intero" | ||
|
||
#: mapstore2_adapter/api/models.py:77 | ||
msgid "Boolean" | ||
msgstr "Booleano" | ||
|
||
#: mapstore2_adapter/api/models.py:78 | ||
msgid "Binary" | ||
msgstr "Binario" | ||
|
||
#: mapstore2_adapter/apps.py:30 | ||
msgid "Django MapStore2 Adapter" | ||
msgstr "Django MapStore2 Adapter" | ||
|
||
#: mapstore2_adapter/geoapps/apps.py:28 | ||
msgid "MapStore2 Geonode Apps Plugins" | ||
msgstr "MapStore2 Geonode Apps Plugins" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:32 | ||
msgid "GeoStory Created" | ||
msgstr "GeoStory creata" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:32 | ||
msgid "A GeoStory was created" | ||
msgstr "È stata creata una GeoStory" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:33 | ||
msgid "GeoStory Updated" | ||
msgstr "GeoStory aggiornata" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:33 | ||
msgid "A GeoStory was updated" | ||
msgstr "Una GeoStory è stata aggiornata" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:34 | ||
msgid "GeoStory Approved" | ||
msgstr "GeoStory approvata" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:34 | ||
msgid "A GeoStory was approved by a Manager" | ||
msgstr "Una GeoStory è stata approvata da un geostore" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:35 | ||
msgid "GeoStory Published" | ||
msgstr "GeoStory pubblicata" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:35 | ||
msgid "A GeoStory was published" | ||
msgstr "È stata pubblicata una GeoStory" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:36 | ||
msgid "GeoStory Deleted" | ||
msgstr "GeoStory eliminata" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:36 | ||
msgid "A GeoStory was deleted" | ||
msgstr "Una GeoStory è stata eliminata" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:37 | ||
msgid "Comment on GeoStory" | ||
msgstr "Commento su una GeoStory" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:37 | ||
msgid "A GeoStory was commented on" | ||
msgstr "Una GeoStory è stata commentata" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:38 | ||
msgid "Rating for GeoStory" | ||
msgstr "Valutazione per GeoStories" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/__init__.py:38 | ||
msgid "A rating was given to a GeoStory" | ||
msgstr "Una valutazione è stata data a una GeoStory" | ||
|
||
#: mapstore2_adapter/geoapps/geostories/models.py:36 | ||
#, python-format | ||
msgid "%s Type" | ||
msgstr "%s Tipo" |
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,40 @@ | ||
# -*- coding: utf-8 -*- | ||
######################################################################### | ||
# | ||
# Copyright 2018, GeoSolutions Sas. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
# | ||
######################################################################### | ||
import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def fixup_map(map_id): | ||
""" ------------------------------------- Maps Fix """ | ||
from geonode.maps.models import Map | ||
from django.contrib.auth import get_user_model | ||
from mapstore2_adapter.api.models import MapStoreResource | ||
for _m in Map.objects.filter(id=map_id): | ||
try: | ||
_u = get_user_model().objects.get(username=_m.owner.username) | ||
_mm = MapStoreResource.objects.filter(id=_m.id) | ||
if _mm.count(): | ||
_mm = _mm.get() | ||
else: | ||
_mm = MapStoreResource.objects.create(id=_m.id, user_id=_u.id) | ||
_mm.user = _u | ||
_mm.save() | ||
except Exception as e: | ||
logger.exception(e) | ||
|
||
|
||
class DjangoMapstore2AdapterBaseException(Exception): | ||
"""Base class for exceptions in this module.""" | ||
pass | ||
|
||
|
||
default_app_config = "mapstore2_adapter.apps.AppConfig" |
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,10 @@ | ||
# -*- coding: utf-8 -*- | ||
######################################################################### | ||
# | ||
# Copyright 2018, GeoSolutions Sas. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
# | ||
######################################################################### |
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,10 @@ | ||
# -*- coding: utf-8 -*- | ||
######################################################################### | ||
# | ||
# Copyright 2018, GeoSolutions Sas. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
# | ||
######################################################################### |
Oops, something went wrong.