Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/core/management/commands/flush.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25350 -- Added alias --no-input for --noinput to ↵Raphael Michel2015-09-081-1/+2
| | | | management commands.
* Fixed #24369 -- Prevented crash when flushing before db ↵Claude Paroz2015-03-051-1/+2
| | | | | | migration Thanks Thomas Tanner for the report and Tim Graham for the review.
* Simplified emit_post_migrate from flush commandClaude Paroz2015-02-281-11/+4
| | | | Follow-up of f4f24d30e0.
* Revert "Fixed #24369 -- Prevented crash when `flush`ing ↵Claude Paroz2015-02-281-4/+0
| | | | | | | before db migration" This reverts commit 9f1dbe29c0dbae57ff7950f3f64a0d083177cca8. The proposed solution does not pass the test suite.
* Fixed #24369 -- Prevented crash when `flush`ing before ↵Claude Paroz2015-02-281-0/+4
| | | | | | db migration Thanks Thomas Tanner for the report.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-3/+3
|
* Removed support for initial_data fixtures per ↵Tim Graham2015-01-171-16/+1
| | | | deprecation timeline.
* Removed pre_syncdb and post_syncdb signals per ↵Tim Graham2015-01-171-1/+1
| | | | deprecation timeline.
* Fixed #23699 -- Prevented flush from loading initial ↵Tony Zhu2014-10-271-3/+7
| | | | data for apps with migrations.
* Fixed #22882 -- Fixed a UnicodeDecodeError in flush.Tim Graham2014-09-061-0/+2
| | | | Thanks djbaldey for the report.
* Limited lines to 119 characters in django/Tim Graham2014-09-051-1/+2
| | | | refs #23395.
* Fixed #23067 -- Updated docs to use django-adminChristoph Heer2014-07-301-1/+1
|
* Fixed #22835 -- Deprecated NoArgsCommand.Maxime Turcotte2014-06-191-3/+3
|
* Converted remaining management commands to argparseClaude Paroz2014-06-141-11/+11
|
* Fixed #22487: Optional rollback emulation for migrated appsAndrew Godwin2014-06-091-5/+4
|
* Avoided transactional truncates on amateur databases.Aymeric Augustin2014-03-221-4/+5
| | | | | | | Fixed a test failure that appeared after 753a22a6, although the bug existed before that commit. Refs #22308.
* Fixed transaction handling in two management commands.Aymeric Augustin2014-03-211-1/+1
| | | | | Previously, when createcachetable and flush operated on non-default databases, they weren't atomic.
* Removed legacy transaction management per the ↵Aymeric Augustin2014-03-211-1/+1
| | | | deprecation timeline.
* Ensure cursors are closed when no longer needed.Michael Manfre2014-02-021-3/+3
| | | | | | 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()'.
* Removed the only_with_models_module argument of ↵Aymeric Augustin2013-12-301-1/+1
| | | | | | | | | get_model[s]. 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.
* Changed get_migratable_models to use an app config.Aymeric Augustin2013-12-291-1/+1
|
* Renamed AppCache to Apps.Aymeric Augustin2013-12-241-3/+3
| | | | | | Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-221-1/+1
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Stopped iterating on INSTALLED_APPS.Aymeric Augustin2013-12-221-3/+2
| | | | Used the app cache's get_app_configs() method instead.
* Moved the new app cache inside core.Aymeric Augustin2013-12-171-1/+1
|
* Made it possible to create apps without a models module.Aymeric Augustin2013-12-171-1/+1
| | | | | | | This commit reverts f44c4a5d0f and 39bbd165. django.test.simple will be updated in a separate commit as it requires invasive changes.
* Deprecated get_apps().Aymeric Augustin2013-12-171-2/+2
|
* Removed module-level functions for the app cache.Aymeric Augustin2013-12-171-2/+3
| | | | | | | | | | | | | | | 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.
* Add get_migratable_models util method to ConnectionRouterClaude Paroz2013-10-161-4/+1
|
* utils.importlib is deprecatedAndrew Godwin2013-08-091-1/+0
|
* Merge remote-tracking branch 'core/master' into ↵Andrew Godwin2013-08-091-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | schema-alteration Conflicts: django/core/management/commands/flush.py django/core/management/commands/syncdb.py django/db/models/loading.py docs/internals/deprecation.txt docs/ref/django-admin.txt docs/releases/1.7.txt
| * Deprecated django.utils.importlibClaude Paroz2013-07-291-1/+1
| | | | | | | | This was a shim for pre-Python 2.7 support.
* | Rename allow_syncdb to allow_migrateAndrew Godwin2013-07-301-1/+1
| |
* | Rename pre_ and post_syncdb to *_migrate, with aliases ↵Andrew Godwin2013-07-301-11/+11
|/ | | | from old names
* Fixed #20579 -- Improved TransactionTestCase.available_apps.Aymeric Augustin2013-06-121-11/+17
| | | | | | | | | | | Also moved its documentation to the 'advanced' section. It doesn't belong to the 'overview'. Same for TransactionTestCase.reset_sequences. When available_apps is set, after a TransactionTestCase, the database is now totally empty. post_syncdb is fired at the beginning of the next TransactionTestCase. Refs #20483.
* Added a stealth option to flush to allow cascades.Aymeric Augustin2013-06-101-2/+5
| | | | | | | | | This allows using flush on a subset of the tables without having to manually cascade to all tables with foreign keys to the tables being truncated, when they're known to be empty. On databases where truncate is implemented with DELETE FROM, this doesn't make a difference. The cascade is allowed, not mandatory.
* Fixed #11398 - Added a pre_syncdb signalDonald Stufft2013-05-231-1/+1
|
* Fixed #18003 -- Preserved tracebacks when re-raising errors.konarkmodi2013-03-191-7/+10
| | | | Thanks jrothenbuhler for draft patch, Konark Modi for updates.
* Deprecated transaction.commit/rollback_unless_managed.Aymeric Augustin2013-03-111-5/+4
| | | | | | | | Since "unless managed" now means "if database-level autocommit", committing or rolling back doesn't have any effect. Restored transactional integrity in a few places that relied on automatically-started transactions with a transitory API.
* Removed unused options copy in flushClaude Paroz2013-03-011-2/+0
| | | | | This was used at the time the 'database' option did not default to DEFAULT_DB_ALIAS in make_option.
* [py3] Replaced raw_input by inputClaude Paroz2012-08-081-1/+2
| | | | | The six addition has been borrowed from: https://bitbucket.org/gutworth/six/changeset/733ef740
* Fixed #18271 -- Changed stage at which ↵Ramiro Morales2012-07-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | TransactionTestCase flushes DB tables. Previously, the flush was done before the test case execution and now it is performed after it. Other changes to the testing infrastructure include: * TransactionTestCase now doesn't reset autoincrement sequences either (previous behavior can achieved by using `reset_sequences`.) With this, no implicit such reset is performed by any of the provided TestCase classes. * New ordering of test cases: All unittest tes cases are run first and doctests are run at the end. THse changes could be backward-incompatible with test cases that relied on some kind of state being preserved between tests. Please read the relevant sections of the release notes and testing documentation for further details. Thanks Andreas Pelme for the initial patch. Karen Tracey and Anssi Kääriäinen for the feedback and Anssi for reviewing. This also fixes #12408.
* Made TestNoInitialDataLoading pass with MySQL (Refs #15926)Claude Paroz2012-06-061-3/+2
|
* Fixed #15926 -- Added option --no-initial-data to syncdb ↵Honza Kral2012-06-051-1/+6
| | | | | | and flush. Thanks msiedlarek, jpaugh64 and vlinhart!
* Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz2012-04-291-1/+1
| | | | | Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
* Removed direct print statements from django management ↵Claude Paroz2012-04-261-1/+1
| | | | | | commands. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13760 -- Cleaned up unnecessary default option ↵Julien Phalip2011-10-231-2/+2
| | | | | | handling in a bunch of management commands. Thanks to Paul McMillan for the report and to adamv and Claude Paroz for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6011 -- Improved help text for flush command. ↵Paul McMillan2011-09-221-1/+4
| | | | | | Thanks Julien for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* When looking for django tables which exist, query for ↵Alex Gaynor2010-10-311-1/+0
| | | | | | all tables once, not once *per table*. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Always pass models in post_syncdb signals as a set (not ↵Malcolm Tredinnick2010-09-121-1/+1
| | | | | | | | | | as a list sometimes). Fixed #5848, thanks to PJCrosier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13768 bcc190cf-cafb-0310-a4f2-bffc1f526a37