Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GNIP 97: New metadata editor (#12794)
* Initial commit for the metadata architecture refactoring * improving the code * update the first handler * rename the file of the main schema * fixing manage.py * For testing a specific folder for json schemas examples was created * formatting the json schema files * update the json schema examples * adding the metadata/schema endpoint under api/v2 * rename the action of getting schema * adding the metadata/instance/{pk} endpoint * adding handlers registry * update metadata manager * update the metadata/{pk} to metadata/instance/{pk} * update the /metadata/schema endpoint * Handlers refactoring, i18n * Add TKeywords subschema * Metadata TKeywords: fix max card * TKeywords: Fix schema * Tkeywords: void get_jsonschema_instance * TKeywords: Fix autocomplete; localization * Thesaurus schema: Improve localization * TKeywords: Improve autocomplete * adding PUT functionality to the endpoint metadata/instance/{pk} * rename the view of metadata/instance/{pk} endpoint * TKeywords: Improve autocomplete * TKeywords: move tkeywords just under category field * Many improvements and addings to the base handler * Some more improvements and addings to the base handler * Return proper json schema instance * Return proper json schema instance * adding a handler for the regions field: RegionsHandler * Add DOI handler * Improvements and fixes * fixing Region autocomplete * Add DOI handler * Simplify tkeywords schema * adding serialize method to other FKs of the BaseHandler * Extending PUT and removing serialization * Fix PUT/PATCH * Fixes: now patch returns without major errors * Storing FKs to the resource model * small improvements to store FK values * TKeywords get and patch working. Added i18n to instance request * Cleanup: black and flake * Added contacts schema. Moved tkeywords autocomplete. * Load+store contacts * Added linked resources handler * Regions autocomplete * Regions load/store * Extending the Regions autocomplete results * format fixing * update the MetadataRegionsAutocomplete class * Metadata: review label i18n * Metadata: hkeywords handler - WIP * Minor improvement * Metadata: hkeywords handler * Metadata: group handler * Metadata: set owner fields as required * Metadata: doi: implement update_resource * Many improvements and fixes Sparse fields, model + handler Fix id type Handling required fields Add load_serialization_context Add null type to most optional fields Caching schema Simplified handler registration * Cleanup * Add error handling, Improve sparse field loading * Initial INSPIRE app * May improvements: sparse fields, i18n,... - Handling complex values in sparse fields - Added i18n via thesaurus - Improved subschema handling - Renamed base schema json file * tests for views * adding more tests for views * Tkeywords: hide property if no thesaurus configured * Create test errors recursively * Recurse localization in complex sparse fields * Metadata: fix contact roles * Metadata: improve handling of None values in sparse fields * Metadata: add authorization to metadata access * Metadata: fix required rolenames * Metadata: improve type handling in sparse fields * adding tests for views and manager * Metadata: improve handling of None values in sparse fields * Metadata: tentative handling of categories via autocomplete * Metadata: tentative handling of categories via autocomplete * adding base handlers tests * Metadata: tentative handling of categories via autocomplete * Metadata: handling licenses via autocomplete * Black/flake * Fix i18n caching * adding more tests for the BaseHandler * Fix flake * Black/flake * Metadata: fix group handling * Metadata: fix FK handling * adding tests for region and linkedrsources handers * fixing tests * black reformating * adding tests and reformatting * removing unused modules * removing Permissions module * adding tests for Group and Hkeyword handlers * add a flake issue * fixing views tsts * adding tests for Contact and Thesaurus handlers and autocomplete views * formatting issues * adding tests for autocomplete views and Thesaurus handler * adding tests for sparse handler * fixing format issues * Fix load_thesaurus * Remove stale sample schemas * Metadata: reload schema when labels on DB change * Fix linked resources API * Added __init__ to tests dir * Fix UserHasPerms in views * Remove geonode.inspire app * Some improvements after review * Delete unneeded migration * Some improvements after review * Metadata: show contact cardinalities only in debug mode * Fix save: make proper signals work --------- Co-authored-by: gpetrak <gkpetrak@gmail.com>
- Loading branch information