Export-import object types with UUID retention#745
Export-import object types with UUID retention#745CharString wants to merge 13 commits intomasterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #745 +/- ##
==========================================
+ Coverage 85.58% 86.37% +0.79%
==========================================
Files 144 145 +1
Lines 3003 3142 +139
Branches 236 253 +17
==========================================
+ Hits 2570 2714 +144
+ Misses 381 376 -5
Partials 52 52 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b40b7ce to
67eed69
Compare
8e11b96 to
dc54480
Compare
Also updated their dependencies to solve import and api issues.
Hacked it into a bounds check.
dc54480 to
a3d29d5
Compare
Queryset is never empty; django admin already checks this when performing an action.
a3d29d5 to
ae2f045
Compare
| {{ form.non_field_errors }} | ||
| </div> | ||
| {% endif %} | ||
| <fieldset class="module aligned"> |
There was a problem hiding this comment.
This "aligned" class makes field errors look visually "off" to my eyes (huge left margin). But it already looked like that...
There was a problem hiding this comment.
Hmm yeah it definitely looks off, could you remove the aligned class to make it look a bit better?
stevenbal
left a comment
There was a problem hiding this comment.
@CharString could you add some basic documentation under Manual to describe how to do exports and imports?
| {{ form.non_field_errors }} | ||
| </div> | ||
| {% endif %} | ||
| <fieldset class="module aligned"> |
There was a problem hiding this comment.
Hmm yeah it definitely looks off, could you remove the aligned class to make it look a bit better?
src/objects/core/forms.py
Outdated
| ) | ||
| keep_uuid = forms.BooleanField( | ||
| label=_("Keep the UUIDs the same"), | ||
| help_text=_("Import keeping the same UUID as in the export."), |
There was a problem hiding this comment.
| help_text=_("Import keeping the same UUID as in the export."), | |
| help_text=_("Import keeping the same UUIDs as in the export."), |
src/objects/core/import_export.py
Outdated
|
|
||
| class Meta(_ObjectTypeSerializer.Meta): | ||
| fields = [ | ||
| field for field in _ObjectTypeSerializer.Meta.fields if field not in ["url"] |
There was a problem hiding this comment.
| field for field in _ObjectTypeSerializer.Meta.fields if field not in ["url"] | |
| field for field in _ObjectTypeSerializer.Meta.fields if field != "url" |
Co-authored-by: Steven Bal <steven@maykinmedia.nl>
Still not super pretty, but .aligned has a lot of left margin, which looks very off.
@stevenbal I've put the documentation under |
Fixes #565
Changes
Adds export to file action, and import from file to objecttype admin.