Export and Import of Projects, update and refactor for cli and drf#1394
Open
MyPyDavid wants to merge 169 commits into3.0.0/releasefrom
Open
Export and Import of Projects, update and refactor for cli and drf#1394MyPyDavid wants to merge 169 commits into3.0.0/releasefrom
MyPyDavid wants to merge 169 commits into3.0.0/releasefrom
Conversation
Member
Author
Import with memberships is only supported via the management command for now. Other notes: |
remove separate debounced components
* create Tile, TileGrid helper components * add API entries * add css
* fix form
* use form components * implement debounce fetch and save
* add ProjectDelete
* add actions
* add TODOs
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
…and use django FileSystemStorage Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
ffd5955 to
b337a73
Compare
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Member
Author
|
For import plugins: |
bed62c2 to
f10eac0
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR updates and refactors the project export management command and adds a project import command.
Initially, It was GPT generated because many parts of the RDMO import functions were not easily re-usable for a management command. However the code has been re-evaluated and re-factored to fit better in the rdmo code base.
An extra added functionality is, the export and import of the project members (
--include-memberships), it currently creates an extra JSON file with the memberships but it probably should be integrated to the export format (like XML). In another instance the users can then be created or retrieved via email addresses.As a side note, for when using a socialaccount provider, that would require an extra "existing account adapter" that lets a social login be connected to the existing user via the verified email address for example.
This PR should aim to refactor the RDMO project export and import functions so that they can easily be re-used for these CLI commands and for the DRF endpoints.
CLI, management commands
The
import_projectscommand:and
export_projects:Two methods
render_memberandrender_member_userwere added to the XML renderer.The memberships can be exported to the xml and will look like this:
Try out locally:
DRF, endpoints and actions
For exporting an existing project:
api/v1/projects/projects/<pk>/export/<export_format>For project creation with an import
/api/v1/projects/projects/{id}/import-create-preview/api/v1/projects/projects/{id}/import-create-confirm/For updating an existing project with an import
/api/v1/projects/projects/{id}/import-update-preview/api/v1/projects/projects/{id}/import-update-confirm/Related issues are #1277 #1357