-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GNIP 97: New metadata editor #12794
Open
etj
wants to merge
115
commits into
master
Choose a base branch
from
metadata_manager
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,022
−39
Open
GNIP 97: New metadata editor #12794
Changes from all commits
Commits
Show all changes
115 commits
Select commit
Hold shift + click to select a range
e51ee5d
Initial commit for the metadata architecture refactoring
Gpetrak afe2b79
improving the code
Gpetrak fbdb30a
update the first handler
Gpetrak 65f477f
rename the file of the main schema
Gpetrak bafa137
fixing manage.py
Gpetrak 47f1fa9
For testing a specific folder for json schemas examples was created
Gpetrak 32fab1d
formatting the json schema files
Gpetrak 506dc4e
update the json schema examples
Gpetrak b28305e
adding the metadata/schema endpoint under api/v2
Gpetrak 972d638
rename the action of getting schema
Gpetrak 28ede60
adding the metadata/instance/{pk} endpoint
Gpetrak 9b71a99
adding handlers registry
Gpetrak da3b29f
update metadata manager
Gpetrak 7be46be
update the metadata/{pk} to metadata/instance/{pk}
Gpetrak 98542ee
update the /metadata/schema endpoint
Gpetrak d99183e
Handlers refactoring, i18n
etj 0b464db
Merge branch 'metadata_manager' of github.com:GeoNode/geonode into me…
etj 4423816
Add TKeywords subschema
etj 4adabbe
Metadata TKeywords: fix max card
etj 9450eab
TKeywords: Fix schema
etj 9bbed4e
Tkeywords: void get_jsonschema_instance
etj 1b1f589
TKeywords: Fix autocomplete; localization
etj 028067c
Thesaurus schema: Improve localization
etj b161aa0
TKeywords: Improve autocomplete
etj 963f480
adding PUT functionality to the endpoint metadata/instance/{pk}
Gpetrak 6fc0047
rename the view of metadata/instance/{pk} endpoint
Gpetrak 612a1f7
TKeywords: Improve autocomplete
etj f0ea8e8
TKeywords: move tkeywords just under category field
etj 8e4bd6a
Many improvements and addings to the base handler
etj 00d3c93
Some more improvements and addings to the base handler
etj ed7df68
Return proper json schema instance
etj 41435ef
Return proper json schema instance
etj caae3d9
adding a handler for the regions field: RegionsHandler
Gpetrak ff45f10
Add DOI handler
etj 9bc613d
Improvements and fixes
etj 6957007
fixing Region autocomplete
Gpetrak 94fd9ec
Add DOI handler
etj 88a6a53
Simplify tkeywords schema
etj 17d44ba
Merge branch 'metadata_manager' of https://github.com/GeoNode/geonode…
Gpetrak 3f137d5
adding serialize method to other FKs of the BaseHandler
Gpetrak 4bc01af
Extending PUT and removing serialization
Gpetrak e5b05a6
Fix PUT/PATCH
etj aa5afc8
Fixes: now patch returns without major errors
etj 037ea1f
Storing FKs to the resource model
Gpetrak 3d7e062
small improvements to store FK values
Gpetrak 69dcc10
TKeywords get and patch working. Added i18n to instance request
etj 481f5ea
Cleanup: black and flake
etj e2cc1c7
Added contacts schema.
etj b095a7a
Load+store contacts
etj aaf4f2f
Added linked resources handler
etj b4f1129
Regions autocomplete
etj d358c0a
Regions load/store
etj d472368
Extending the Regions autocomplete results
Gpetrak 565f27d
format fixing
Gpetrak 838a831
update the MetadataRegionsAutocomplete class
Gpetrak 05a60b7
Metadata: review label i18n
etj 337e781
Metadata: hkeywords handler - WIP
etj a039e16
Minor improvement
etj 0ab811b
Metadata: hkeywords handler
etj 64c41a9
Metadata: group handler
etj d1835ad
Metadata: set owner fields as required
etj ec7761f
Metadata: doi: implement update_resource
etj 728a25a
Many improvements and fixes
etj 857103f
Cleanup
etj dc9dd8c
Add error handling, Improve sparse field loading
etj d960746
Initial INSPIRE app
etj 422cae8
May improvements: sparse fields, i18n,...
etj 55c4ebc
Merge branch 'master' of https://github.com/GeoNode/geonode into meta…
Gpetrak 1cfa446
tests for views
Gpetrak b89471e
adding more tests for views
Gpetrak ed76dfd
Tkeywords: hide property if no thesaurus configured
etj 24bf1c8
Create test errors recursively
etj 5316dbe
Recurse localization in complex sparse fields
etj ced8abe
Merge branch 'metadata_manager' of https://github.com/GeoNode/geonode…
Gpetrak 99b1396
Metadata: fix contact roles
etj a619d02
Metadata: improve handling of None values in sparse fields
etj 64bd634
Metadata: add authorization to metadata access
etj 3172f75
Metadata: fix required rolenames
etj d33db5c
Metadata: improve type handling in sparse fields
etj ce36d86
adding tests for views and manager
Gpetrak 8160a90
Metadata: improve handling of None values in sparse fields
etj 73c4895
Metadata: tentative handling of categories via autocomplete
etj 5ad930a
Metadata: tentative handling of categories via autocomplete
etj 0eb0853
adding base handlers tests
Gpetrak e3defc2
Metadata: tentative handling of categories via autocomplete
etj f69ddde
Metadata: handling licenses via autocomplete
etj 545a393
Black/flake
etj bd8d860
Fix i18n caching
etj 352562d
adding more tests for the BaseHandler
Gpetrak 98cfe08
Fix flake
etj e7b8045
Black/flake
etj bacbe51
Metadata: fix group handling
etj aef2940
Metadata: fix FK handling
etj a7dcf0a
adding tests for region and linkedrsources handers
Gpetrak 0aa4d4e
Merge branch 'metadata_manager' of https://github.com/GeoNode/geonode…
Gpetrak 8c1f40f
fixing tests
Gpetrak 88361e4
black reformating
Gpetrak 4f4b07a
adding tests and reformatting
Gpetrak c1dced0
removing unused modules
Gpetrak 5c6e9cb
removing Permissions module
Gpetrak fdf4cc9
adding tests for Group and Hkeyword handlers
Gpetrak 7090489
add a flake issue
Gpetrak d09caed
fixing views tsts
Gpetrak b7eec64
adding tests for Contact and Thesaurus handlers and autocomplete views
Gpetrak 94bc14b
formatting issues
Gpetrak a153759
adding tests for autocomplete views and Thesaurus handler
Gpetrak 2c07377
adding tests for sparse handler
Gpetrak 9ebc683
fixing format issues
Gpetrak 16f525a
Fix load_thesaurus
etj f5ae298
Remove stale sample schemas
etj 29d5d1b
Metadata: reload schema when labels on DB change
etj 23610a9
Fix linked resources API
etj 7e81443
Added __init__ to tests dir
etj 4107fb3
Fix UserHasPerms in views
etj c07bf42
Remove geonode.inspire app
etj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Empty file.
Empty file.
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,72 @@ | ||
######################################################################### | ||
# | ||
# 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 path | ||
from rest_framework import routers | ||
|
||
from geonode.metadata.api import views | ||
from geonode.metadata.api.views import ( | ||
ProfileAutocomplete, | ||
MetadataLinkedResourcesAutocomplete, | ||
MetadataRegionsAutocomplete, | ||
MetadataHKeywordAutocomplete, | ||
MetadataGroupAutocomplete, | ||
) | ||
|
||
router = routers.DefaultRouter() | ||
router.register(r"metadata", views.MetadataViewSet, basename="metadata") | ||
|
||
urlpatterns = router.urls + [ | ||
path( | ||
r"metadata/autocomplete/thesaurus/<thesaurusid>/keywords", | ||
views.tkeywords_autocomplete, | ||
name="metadata_autocomplete_tkeywords", | ||
), | ||
path(r"metadata/autocomplete/users", ProfileAutocomplete.as_view(), name="metadata_autocomplete_users"), | ||
path( | ||
r"metadata/autocomplete/resources", | ||
MetadataLinkedResourcesAutocomplete.as_view(), | ||
name="metadata_autocomplete_resources", | ||
), | ||
path( | ||
r"metadata/autocomplete/regions", | ||
MetadataRegionsAutocomplete.as_view(), | ||
name="metadata_autocomplete_regions", | ||
), | ||
path( | ||
r"metadata/autocomplete/hkeywords", | ||
MetadataHKeywordAutocomplete.as_view(), | ||
name="metadata_autocomplete_hkeywords", | ||
), | ||
path( | ||
r"metadata/autocomplete/groups", | ||
MetadataGroupAutocomplete.as_view(), | ||
name="metadata_autocomplete_groups", | ||
), | ||
path( | ||
r"metadata/autocomplete/categories", | ||
views.categories_autocomplete, | ||
name="metadata_autocomplete_categories", | ||
), | ||
path( | ||
r"metadata/autocomplete/licenses", | ||
views.licenses_autocomplete, | ||
name="metadata_autocomplete_licenses", | ||
), | ||
# path(r"metadata/autocomplete/users", login_required(ProfileAutocomplete.as_view()), name="metadata_autocomplete_users"), | ||
] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any reason why the serializer is no longer used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used indeed.
Please note that the code you're pointing to has changed name from
base_linked_resources_payload
tobase_linked_resources_instances
. The newbase_linked_resources_payload
callsbase_linked_resources_instances
(now also used elsewere for DRY), and still uses the serializer, returning the same content as before.