Re: [Django] #35251: dumpdata refactoring

2024-02-26 Thread Django
#35251: dumpdata refactoring
-+-
 Reporter:  Hovi |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Core (Management |  Version:  5.0
  commands)  |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Hovi):

 I don't need to modify serializers. That's the part I want to reuse as it
 is. I don't expect management commands to be universal tools, but that
 doesn't mean they cannot be more flexible so that when I wanna customize
 them (because they are not universal enough for me), I can do that without
 just copy-pasting the whole file.

 What I intend to do mostly is to create my own custom way to filter
 apps/models/model instances while pretty much keeping the rest the same.

 One way how can I reuse it is to use `call_command`, passing loads and
 loads PKs but that is less flexible and definitely feels wrong for various
 reasons.
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018de664f5bd-2e6866b5-e895-4b71-8c28-2d4c7a3f6037-00%40eu-central-1.amazonses.com.


Re: [Django] #35251: dumpdata refactoring

2024-02-26 Thread Django
#35251: dumpdata refactoring
-+-
 Reporter:  Hovi |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Core (Management |  Version:  5.0
  commands)  |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * resolution:   => needsinfo
 * status:  new => closed
 * type:  Cleanup/optimization => New feature

Comment:

 Most of the customization should be handle with custom serializers. The
 ticket description doesn't provide any details about what you want to
 achieve that serializers cannot handle. Take into account that builtin
 management commands are not intended to be universal tools for handling
 all possible edge cases.
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018de549211e-710cec0e-dbe3-409a-afe0-caf063fe85e7-00%40eu-central-1.amazonses.com.


[Django] #35251: dumpdata refactoring

2024-02-24 Thread Django
#35251: dumpdata refactoring
-+-
   Reporter:  Hovi   |  Owner:  nobody
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  Core   |Version:  5.0
  (Management commands)  |
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 As far as I know, there is not more granular control over dumping database
 fixtures.
 I need to create fixtures in a more controlled fashion so I will do my own
 management command, I basically gotta copy-paste whole dumpdata management
 commant code and then modify relatively small part of it while keeping the
 rest the same.

 The main logic of `dumpdata` it is directly in `handle` method, which
 makes it impossible to reuse. I'd like to refactor contents of this method
 into smaller methods so that I can reuse some of it and make it easier to
 use dumping functionality.

 Is that something that would be welcome?
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ddf221b4c-8dd354ae-5f7d-4aaa-821a-5b0194c461ea-00%40eu-central-1.amazonses.com.