summaryrefslogtreecommitdiff
path: root/django/core/management/commands/dumpdata.py
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2024-05-10Fixed #35429 -- Added argparse choices to --database options.SaJH
2024-01-31Fixed #35159 -- Fixed dumpdata crash when base querysets use prefetch_related().Mariusz Felisiak
Regression in 139135627650ed6aaaf4c755b82c3bd43f2b8f51 following deprecation in edbf930287cb72e9afab1f7208c24b1146b0c4ec. Thanks Andrea F for the report.
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-01-12Fixed #32291 -- Added fixtures compression support to dumpdata.Paolo Melchiorre
2020-10-28Made small readability improvements.Martin Thoma
2020-04-07Refs #31051 -- Made dumpdata do not sort dependencies if natural foreign ↵Matthijs Kooijman
keys are not used. There is no need to sort dependencies when natural foreign keys are not used.
2020-04-07Fixed #31051 -- Allowed dumpdata to handle circular references in natural keys.Matthijs Kooijman
Since #26291 forward references in natural keys are properly handled by loaddata, so sorting depenencies in dumpdata doesn't need to break on cycles. This patch allows circular references in natural keys by breaking sort_depenencies() on loops.
2019-04-18Fixed typos in docs, comments, and exception messages.Ville Skyttä
2019-02-06Fixed #30159 -- Removed unneeded use of OrderedDict.Nick Pope
Dicts preserve order since Python 3.6.
2018-07-02Removed parser.add_arguments() arguments that match the defaults.Claude Paroz
2017-12-04Fixed #28860 -- Removed unnecessary len() calls.Дилян Палаузов
2017-09-13Removed unnecessary parens in various code.Mariusz Felisiak
2017-08-23Used OrderedDict.fromkeys() to initialize OrderedDict with None values.Sergey Fedoseev
2017-04-01Removed implicit default store_true/false argparse args.Jon Dufresne
argparse automatically sets the default value for store_true/false arguments to its opposite.
2017-02-23Refs #23919 -- Used yield from.Vytis Banaitis
2016-07-16Fixed #26826 -- Stripped spaces from dumpdata pks argumentsClaude Paroz
Thanks Kevin Graham Foster for the report and Tim Graham for the review.
2016-06-09Fixed #20468 -- Added loaddata --exclude option.Berker Peksag
Thanks Alex Morozov for the initial patch.
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-03-05Refs #26315 -- Cleaned up argparse options in commands.Jon Dufresne
* Removed type coercion. Options created by argparse are already coerced to the correct type. * Removed fallback default values. Options created by argparse already have a default value. * Used direct indexing. Options created by argparse are always set. This eliminates the need to use dict.get().
2016-02-05Refs #26144 -- Used proxy_for_model instead of mro inspection.Simon Charette
2016-02-04Fixed #26144 -- Warned when dumping proxy model without concrete parent.Yoong Kang Lim
2015-07-24Fixed #22258 -- Added progress status for dumpdata when outputting to fileClaude Paroz
Thanks Gwildor Sok for the report and Tim Graham for the review.
2015-05-22Fixed #24776 -- Improved apps.get_app_config() error message on ↵Peter Inglesby
fully-qualified package names.
2015-02-20Fixed #24351, #24346 -- Changed the signature of allow_migrate().Loic Bistuer
The new signature enables better support for routing RunPython and RunSQL operations, especially w.r.t. reusable and third-party apps. This commit also takes advantage of the deprecation cycle for the old signature to remove the backward incompatibility introduced in #22583; RunPython and RunSQL won't call allow_migrate() when when the router has the old signature. Thanks Aymeric Augustin and Tim Graham for helping shape up the patch. Refs 22583.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-17Removed dumpdata --natural option and serializers use_natural_keys parameter.Tim Graham
Per deprecation timeline; refs #13252.
2014-10-16Fixed #23660 -- Moved sort_dependencies to core.Collin Anderson
2014-06-14Converted remaining management commands to argparseClaude Paroz
2014-05-26Fixed a few ResourceWarning in the test suite. Refs #22680.Loic Bistuer
2014-05-11Fixed #14226 -- Dependency calculation for complex M2M relations.Rainer Koirikivi
`sort_dependencies` incorrectly interpreted 'complex' M2M relations (with explicit through models) as dependencies for a model. This caused circular complex M2M relations to be unserializable by dumpdata. Thanks to aneil for the report and outofculture for initial tests.
2014-03-25flake8 and doc fixes for refs #22257.Tim Graham
2014-03-25Fixed #22257 -- Added file output option to dumpdata command.Anubhav Joshi
2014-03-18Mentioned that ``dumpdata --natural`` is deprecated.Daniel Hahler
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2014-02-12Fixed #22025 -- Listing app followed by app.Model in dumpdata commandEli Bendersky
When invoked as follows: $ python manage.py dumpdata blogapp blogapp.Tag Django would throw a TypeError. This commit fixes the problem and provides a test.
2014-01-26Took advantage of the new get_model API. Refs #21702.Aymeric Augustin
2013-12-30Removed the only_with_models_module argument of get_model[s].Aymeric Augustin
Now that the refactorings are complete, it isn't particularly useful any more, nor very well named. Let's keep the API as simple as possible. Fixed #21689.
2013-12-29Added AppConfig.get_models().Aymeric Augustin
2013-12-28Changed get_model to raise an exception on errors.Aymeric Augustin
Returning None on errors required unpythonic error checking and was inconsistent with get_app_config. get_model was a private API until the previous commit, but given that it was certainly used in third party software, the change is explained in the release notes. Applied the same change to get_registered_model, which is a new private API introduced during the recent refactoring.
2013-12-28Used app_label instead of appname.Aymeric Augustin
The last component of the dotted path to the application module is consistently referenced as the application "label". For instance it's AppConfig.label. appname could be confused with AppConfig.name, which is the full dotted path.
2013-12-27Refactored dumpdata with app configs instead of models modules.Aymeric Augustin
2013-12-24Renamed AppCache to Apps.Aymeric Augustin
Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-17Moved the new app cache inside core.Aymeric Augustin
2013-12-17Made it possible to create apps without a models module.Aymeric Augustin
This commit reverts f44c4a5d0f and 39bbd165. django.test.simple will be updated in a separate commit as it requires invasive changes.
2013-12-17Deprecated get_app().Aymeric Augustin
2013-12-17Deprecated get_apps().Aymeric Augustin