Skip to content

Commit cf5d332

Browse files
Merge branch 'ISSUE_12713' of github.com:GeoNode/geonode into ISSUE_12713
2 parents f9fd668 + 1d9d288 commit cf5d332

File tree

130 files changed

+1810
-15609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1810
-15609
lines changed

.circleci/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,43 +104,43 @@ workflows:
104104
codecov_name: smoke_tests
105105
load_docker_cache: false
106106
save_docker_cache: false
107-
test_suite: ./test.sh geonode.tests.smoke geonode.tests.test_message_notifications geonode.tests.test_rest_api geonode.tests.test_search geonode.tests.test_utils geonode.tests.test_headers
107+
test_suite: ./tests/test.sh geonode.tests.smoke geonode.tests.test_message_notifications geonode.tests.test_rest_api geonode.tests.test_search geonode.tests.test_utils geonode.tests.test_headers
108108
- build:
109109
name: geonode_test_suite
110110
codecov_name: main_tests
111111
load_docker_cache: false
112112
save_docker_cache: false
113-
test_suite: ./test.sh $(python -c "import sys;from geonode import settings;sys.stdout.write('\'' '\''.join([a+'\''.tests'\'' for a in settings.GEONODE_APPS if '\''security'\'' not in a and '\''geoserver'\'' not in a and '\''upload'\'' not in a]))") geonode.thumbs.tests geonode.people.tests geonode.people.socialaccount.providers.geonode_openid_connect.tests
113+
test_suite: ./tests/test.sh $(python -c "import sys;from geonode import settings;sys.stdout.write('\'' '\''.join([a+'\''.tests'\'' for a in settings.GEONODE_APPS if '\''security'\'' not in a and '\''geoserver'\'' not in a and '\''upload'\'' not in a]))") geonode.thumbs.tests geonode.people.tests geonode.people.socialaccount.providers.geonode_openid_connect.tests
114114
- build:
115115
name: geonode_test_security
116116
codecov_name: security_tests
117117
load_docker_cache: false
118118
save_docker_cache: false
119-
test_suite: ./test.sh $(python -c "import sys;from geonode import settings;sys.stdout.write('\'' '\''.join([a+'\''.tests'\'' for a in settings.GEONODE_APPS if '\''security'\'' in a]))")
119+
test_suite: ./tests/test.sh $(python -c "import sys;from geonode import settings;sys.stdout.write('\'' '\''.join([a+'\''.tests'\'' for a in settings.GEONODE_APPS if '\''security'\'' in a]))")
120120
- build:
121121
name: geonode_test_gis_backend
122122
codecov_name: gis
123123
load_docker_cache: false
124124
save_docker_cache: false
125-
test_suite: ./test.sh $(python -c "import sys;from geonode import settings;sys.stdout.write('\'' '\''.join([a+'\''.tests'\'' for a in settings.GEONODE_APPS if '\''geoserver'\'' in a]))")
125+
test_suite: ./tests/test.sh $(python -c "import sys;from geonode import settings;sys.stdout.write('\'' '\''.join([a+'\''.tests'\'' for a in settings.GEONODE_APPS if '\''geoserver'\'' in a]))")
126126
- build:
127127
name: geonode_test_rest_apis
128128
codecov_name: api
129129
load_docker_cache: false
130130
save_docker_cache: false
131-
test_suite: ./test.sh geonode.api.tests geonode.base.api.tests geonode.layers.api.tests geonode.maps.api.tests geonode.documents.api.tests geonode.geoapps.api.tests
131+
test_suite: ./tests/test.sh geonode.api.tests geonode.base.api.tests geonode.layers.api.tests geonode.maps.api.tests geonode.documents.api.tests geonode.geoapps.api.tests
132132
- build:
133133
name: geonode_test_csw
134134
codecov_name: csw
135135
load_docker_cache: false
136136
save_docker_cache: false
137-
test_suite: ./test.sh geonode.tests.csw geonode.catalogue.backends.tests
137+
test_suite: ./tests/test.sh geonode.tests.csw geonode.catalogue.backends.tests
138138
- build:
139139
name: geonode_upload
140140
codecov_name: importer
141141
load_docker_cache: false
142142
save_docker_cache: false
143-
test_suite: ./test.sh geonode.upload
143+
test_suite: ./tests/test.sh geonode.upload
144144
# TODO
145145
# - build:
146146
# name: geonode_test_integration_upload

.clabot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"fvicent",
7979
"RegisSinjari",
8080
"Gpetrak",
81+
"cmotadev",
8182
"kilichenko-pixida"
8283
]
8384
}

.pre-commit-config.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.tx/config

Lines changed: 0 additions & 38 deletions
This file was deleted.

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ The PRIMARY AUTHORS are (and/or have been):
4343
* Toni Schönbuchner (t-book)
4444
* Florian Hoedt / Thünen-Institute (gannebamm)
4545
* Giovanni Allegri (giohappy)
46+
* Mattia Giupponi (mattiagiupponi)
4647

4748
And here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --
4849
people who have submitted patches, reported bugs, added translations, helped

geonode/base/api/tests.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from django.contrib.auth import get_user_model
4343

4444
from owslib.etree import etree
45+
from avatar.templatetags.avatar_tags import avatar_url
4546

4647
from rest_framework.test import APITestCase
4748
from rest_framework.renderers import JSONRenderer
@@ -1031,13 +1032,13 @@ def test_perms_resources(self):
10311032
"username": bobby.username,
10321033
"first_name": bobby.first_name,
10331034
"last_name": bobby.last_name,
1034-
"avatar": "https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e/?s=240",
1035+
"avatar": build_absolute_uri(avatar_url(bobby)),
10351036
"permissions": "owner",
10361037
"is_staff": False,
10371038
"is_superuser": False,
10381039
},
10391040
{
1040-
"avatar": "https://www.gravatar.com/avatar/7a68c67c8d409ff07e42aa5d5ab7b765/?s=240",
1041+
"avatar": build_absolute_uri(avatar_url(bobby)),
10411042
"first_name": "admin",
10421043
"id": 1,
10431044
"last_name": "",
@@ -1112,7 +1113,7 @@ def test_perms_resources(self):
11121113
"username": bobby.username,
11131114
"first_name": bobby.first_name,
11141115
"last_name": bobby.last_name,
1115-
"avatar": "https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e/?s=240",
1116+
"avatar": build_absolute_uri(avatar_url(bobby)),
11161117
"permissions": "owner",
11171118
"is_staff": False,
11181119
"is_superuser": False,
@@ -1122,13 +1123,13 @@ def test_perms_resources(self):
11221123
"username": norman.username,
11231124
"first_name": norman.first_name,
11241125
"last_name": norman.last_name,
1125-
"avatar": "https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e/?s=240",
1126+
"avatar": build_absolute_uri(avatar_url(bobby)),
11261127
"permissions": "edit",
11271128
"is_staff": False,
11281129
"is_superuser": False,
11291130
},
11301131
{
1131-
"avatar": "https://www.gravatar.com/avatar/7a68c67c8d409ff07e42aa5d5ab7b765/?s=240",
1132+
"avatar": build_absolute_uri(avatar_url(bobby)),
11321133
"first_name": "admin",
11331134
"id": 1,
11341135
"last_name": "",
@@ -1161,13 +1162,13 @@ def test_perms_resources(self):
11611162
"username": bobby.username,
11621163
"first_name": bobby.first_name,
11631164
"last_name": bobby.last_name,
1164-
"avatar": "https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e/?s=240",
1165+
"avatar": build_absolute_uri(avatar_url(bobby)),
11651166
"permissions": "owner",
11661167
"is_staff": False,
11671168
"is_superuser": False,
11681169
},
11691170
{
1170-
"avatar": "https://www.gravatar.com/avatar/7a68c67c8d409ff07e42aa5d5ab7b765/?s=240",
1171+
"avatar": build_absolute_uri(avatar_url(bobby)),
11711172
"first_name": "admin",
11721173
"id": 1,
11731174
"last_name": "",
@@ -1224,13 +1225,13 @@ def test_perms_resources(self):
12241225
"username": bobby.username,
12251226
"first_name": bobby.first_name,
12261227
"last_name": bobby.last_name,
1227-
"avatar": "https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e/?s=240",
1228+
"avatar": build_absolute_uri(avatar_url(bobby)),
12281229
"permissions": "owner",
12291230
"is_staff": False,
12301231
"is_superuser": False,
12311232
},
12321233
{
1233-
"avatar": "https://www.gravatar.com/avatar/7a68c67c8d409ff07e42aa5d5ab7b765/?s=240",
1234+
"avatar": build_absolute_uri(avatar_url(bobby)),
12341235
"first_name": "admin",
12351236
"id": 1,
12361237
"last_name": "",
@@ -2157,7 +2158,7 @@ def test_manager_can_edit_map(self):
21572158
"username": "bobby",
21582159
"first_name": "bobby",
21592160
"last_name": "",
2160-
"avatar": "https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e/?s=240",
2161+
"avatar": build_absolute_uri(avatar_url(bobby)),
21612162
"permissions": "manage",
21622163
"is_superuser": False,
21632164
"is_staff": False,
@@ -2167,7 +2168,7 @@ def test_manager_can_edit_map(self):
21672168
"username": "admin",
21682169
"first_name": "admin",
21692170
"last_name": "",
2170-
"avatar": "https://www.gravatar.com/avatar/7a68c67c8d409ff07e42aa5d5ab7b765/?s=240",
2171+
"avatar": build_absolute_uri(avatar_url(bobby)),
21712172
"permissions": "owner",
21722173
"is_superuser": True,
21732174
"is_staff": True,
@@ -2198,7 +2199,7 @@ def test_manager_can_edit_map(self):
21982199
"username": "bobby",
21992200
"first_name": "bobby",
22002201
"last_name": "",
2201-
"avatar": "https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e/?s=240",
2202+
"avatar": build_absolute_uri(avatar_url(bobby)),
22022203
"permissions": "manage",
22032204
"is_staff": False,
22042205
"is_superuser": False,
@@ -2208,7 +2209,7 @@ def test_manager_can_edit_map(self):
22082209
"username": "admin",
22092210
"first_name": "admin",
22102211
"last_name": "",
2211-
"avatar": "https://www.gravatar.com/avatar/7a68c67c8d409ff07e42aa5d5ab7b765/?s=240",
2212+
"avatar": build_absolute_uri(avatar_url(bobby)),
22122213
"permissions": "owner",
22132214
"is_staff": True,
22142215
"is_superuser": True,
@@ -2237,7 +2238,7 @@ def test_manager_can_edit_map(self):
22372238
"username": "bobby",
22382239
"first_name": "bobby",
22392240
"last_name": "",
2240-
"avatar": "https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e/?s=240",
2241+
"avatar": build_absolute_uri(avatar_url(bobby)),
22412242
"permissions": "manage",
22422243
"is_staff": False,
22432244
"is_superuser": False,
@@ -2247,7 +2248,7 @@ def test_manager_can_edit_map(self):
22472248
"username": "admin",
22482249
"first_name": "admin",
22492250
"last_name": "",
2250-
"avatar": "https://www.gravatar.com/avatar/7a68c67c8d409ff07e42aa5d5ab7b765/?s=240",
2251+
"avatar": build_absolute_uri(avatar_url(bobby)),
22512252
"permissions": "owner",
22522253
"is_staff": True,
22532254
"is_superuser": True,

geonode/documents/admin.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,19 @@ class Meta(ResourceBaseAdminForm.Meta):
3737

3838
class DocumentAdmin(TabbedTranslationAdmin):
3939
exclude = ("ll_bbox_polygon", "bbox_polygon", "srid")
40-
list_display = ("id", "title", "date", "category", "group", "is_approved", "is_published", "metadata_completeness")
40+
list_display = (
41+
"id",
42+
"title",
43+
"date",
44+
"category",
45+
"group",
46+
"is_approved",
47+
"is_published",
48+
"advertised",
49+
"metadata_completeness",
50+
)
4151
list_display_links = ("id",)
42-
list_editable = ("title", "category", "group", "is_approved", "is_published")
52+
list_editable = ("title", "category", "group", "is_approved", "is_published", "advertised")
4353
list_filter = (
4454
"date",
4555
"date_type",

geonode/facets/providers/category.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import logging
2121

2222
from django.db.models import Count
23+
from django.utils.translation import gettext_lazy as _
2324

2425
from geonode.base.models import TopicCategory
2526
from geonode.facets.models import FacetProvider, DEFAULT_FACET_PAGE_SIZE, FACET_TYPE_CATEGORY
@@ -40,7 +41,7 @@ def get_info(self, lang="en", **kwargs) -> dict:
4041
return {
4142
"name": self.name,
4243
"filter": "filter{category.identifier.in}",
43-
"label": "Category",
44+
"label": _("Category"),
4445
"type": FACET_TYPE_CATEGORY,
4546
}
4647

geonode/facets/providers/group.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020

2121
import logging
2222

23+
from django.utils.translation import gettext_lazy as _
2324
from django.db.models import Count
25+
2426
from geonode.facets.models import FacetProvider, DEFAULT_FACET_PAGE_SIZE, FACET_TYPE_GROUP
2527
from geonode.groups.models import GroupProfile
2628
from geonode.security.utils import get_user_visible_groups
@@ -41,7 +43,7 @@ def get_info(self, lang="en", **kwargs) -> dict:
4143
return {
4244
"name": self.name,
4345
"filter": "filter{group.in}",
44-
"label": "Group",
46+
"label": _("Group"),
4547
"type": FACET_TYPE_GROUP,
4648
}
4749

geonode/facets/providers/keyword.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import logging
2121

2222
from django.db.models import Count
23+
from django.utils.translation import gettext_lazy as _
2324

2425
from geonode.base.models import HierarchicalKeyword
2526
from geonode.facets.models import FacetProvider, DEFAULT_FACET_PAGE_SIZE, FACET_TYPE_KEYWORD
@@ -40,7 +41,7 @@ def get_info(self, lang="en", **kwargs) -> dict:
4041
return {
4142
"name": self.name,
4243
"filter": "filter{keywords.slug.in}",
43-
"label": "Keyword",
44+
"label": _("Keyword"),
4445
"type": FACET_TYPE_KEYWORD,
4546
}
4647

0 commit comments

Comments
 (0)