summaryrefslogtreecommitdiff
path: root/django/core/management/commands/flush.py
AgeCommit message (Collapse)Author
2026-01-18Applied Black's 2026 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/26.1.0
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
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
2020-06-04Refs #5086 -- Removed unused only_django argument from sql_flush().Jon Dufresne
Unused (always True) since its introduction in 132605d889db8767a40243259066b8450428714c.
2020-04-27Refs #18325 -- Removed unnecessary line endings in management commands.François Freitag
The OutputWrapper automatically adds \n when it’s not present.
2020-04-21Refs #29983 -- Fixed displaying pathlib.Path database name in flush ↵Mariusz Felisiak
command's inputs.
2020-04-20Fixed #31477 -- Removed "using" argument from ↵Jon Dufresne
DatabaseOperations.execute_sql_flush().
2018-07-02Removed parser.add_arguments() arguments that match the defaults.Claude Paroz
2017-09-07Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."Tim Graham
This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda because try/except performs better.
2017-07-11Fixed #14204 -- Enforced SQLite foreign key constraints.Claude Paroz
Thanks Tim Graham for contributing to the patch and Simon Charette for advice and review.
2017-06-28Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().Mads Jensen
2017-06-16Fixed #27787 -- Made call_command() validate the options it receives.Chandrakant Kumar
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-01-22Refs #23919 -- Replaced six.reraise by raiseClaude Paroz
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
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().
2015-09-08Fixed #25350 -- Added alias --no-input for --noinput to management commands.Raphael Michel
2015-03-05Fixed #24369 -- Prevented crash when flushing before db migrationClaude Paroz
Thanks Thomas Tanner for the report and Tim Graham for the review.
2015-02-28Simplified emit_post_migrate from flush commandClaude Paroz
Follow-up of f4f24d30e0.
2015-02-28Revert "Fixed #24369 -- Prevented crash when `flush`ing before db migration"Claude Paroz
This reverts commit 9f1dbe29c0dbae57ff7950f3f64a0d083177cca8. The proposed solution does not pass the test suite.
2015-02-28Fixed #24369 -- Prevented crash when `flush`ing before db migrationClaude Paroz
Thanks Thomas Tanner for the report.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-17Removed support for initial_data fixtures per deprecation timeline.Tim Graham
2015-01-17Removed pre_syncdb and post_syncdb signals per deprecation timeline.Tim Graham
2014-10-27Fixed #23699 -- Prevented flush from loading initial data for apps with ↵Tony Zhu
migrations.
2014-09-06Fixed #22882 -- Fixed a UnicodeDecodeError in flush.Tim Graham
Thanks djbaldey for the report.
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-07-30Fixed #23067 -- Updated docs to use django-adminChristoph Heer
2014-06-19Fixed #22835 -- Deprecated NoArgsCommand.Maxime Turcotte
2014-06-14Converted remaining management commands to argparseClaude Paroz
2014-06-08Fixed #22487: Optional rollback emulation for migrated appsAndrew Godwin
2014-03-22Avoided transactional truncates on amateur databases.Aymeric Augustin
Fixed a test failure that appeared after 753a22a6, although the bug existed before that commit. Refs #22308.
2014-03-21Fixed transaction handling in two management commands.Aymeric Augustin
Previously, when createcachetable and flush operated on non-default databases, they weren't atomic.
2014-03-21Removed legacy transaction management per the deprecation timeline.Aymeric Augustin
2014-02-02Ensure cursors are closed when no longer needed.Michael Manfre
This commit touchs various parts of the code base and test framework. Any found usage of opening a cursor for the sake of initializing a connection has been replaced with 'ensure_connection()'.
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-29Changed get_migratable_models to use an app config.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-22Stopped iterating on INSTALLED_APPS.Aymeric Augustin
Used the app cache's get_app_configs() method instead.
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_apps().Aymeric Augustin
2013-12-17Removed module-level functions for the app cache.Aymeric Augustin
Since the original ones in django.db.models.loading were kept only for backwards compatibility, there's no need to recreate them. However, many internals of Django still relied on them. They were also imported in django.db.models. They never appear in the documentation, except a quick mention of get_models and get_app in the 1.2 release notes to document an edge case in GIS. I don't think that makes them a public API. This commit doesn't change the overall amount of global state but clarifies that it's tied to the app_cache object instead of hiding it behind half a dozen functions.
2013-10-16Add get_migratable_models util method to ConnectionRouterClaude Paroz
2013-08-09utils.importlib is deprecatedAndrew Godwin