Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/core/management/commands/loaddata.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #24978 -- Escaped special characters in loaddata ↵Moritz Sichert2015-06-141-1/+3
| | | | fixture paths
* Fixed #21652 -- Added notification when processing ↵Yitzhak Clark2015-04-161-1/+8
| | | | | | | objects in loaddata Added a running count of the objects processed by loaddata when verbosity >= 3.
* Fixed #24351, #24346 -- Changed the signature of ↵Loic Bistuer2015-02-201-1/+1
| | | | | | | | | | | | | | | | allow_migrate(). 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.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-4/+6
|
* Removed support for initial_data fixtures per ↵Tim Graham2015-01-171-7/+1
| | | | deprecation timeline.
* Fixed #23468 -- Added checks for duplicate fixtures ↵Konrad Świat2014-10-311-3/+14
| | | | | | | | | directories in loaddata. If settings.FIXTURE_DIRS contains duplicates or a default fixture directory (app_name/fixtures), ImproperlyConfigured is raised. Thanks to Berker Peksag and Tim Graham for review.
* Fixed #23612 -- Normalized fixuture paths to allow ↵Brandon Taylor2014-10-091-1/+1
| | | | referencing relative paths on Windows.
* Only warn about initial data if fixtures have been found.Florian Apolloner2014-07-271-1/+1
|
* Mark initial_data as deprecated separately from syncdb. ↵Andrew Godwin2014-07-251-0/+6
| | | | Refs #23077.
* Converted remaining management commands to argparseClaude Paroz2014-06-141-18/+14
|
* Appeased flake8 2.1.0.Aymeric Augustin2014-04-211-3/+3
|
* Adapted fixture read mode to file typeClaude Paroz2014-04-181-7/+7
| | | | | Binary mode added in ed532a6a1e is not supported by ZipFile. Refs #22399.
* Fixed #22399 -- Forced fixture reading in binary modeClaude Paroz2014-04-181-1/+2
| | | | | | This might help on systems where default encoding is not UTF-8 (and on Python 3). Thanks bacilla for the report.
* Removed legacy transaction management per the ↵Aymeric Augustin2014-03-211-1/+1
| | | | deprecation timeline.
* Fixed #21969: Fix behaviour of initial_data with ↵Andrew Godwin2014-02-091-1/+9
| | | | migrated apps
* Ensure cursors are closed when no longer needed.Michael Manfre2014-02-021-4/+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()'.
* Renamed AppCache to Apps.Aymeric Augustin2013-12-241-2/+2
| | | | | | 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.
* Moved the new app cache inside core.Aymeric Augustin2013-12-171-1/+1
|
* Deprecated get_app_package, get_app_path and get_app_paths.Aymeric Augustin2013-12-171-2/+2
|
* Removed module-level functions for the app cache.Aymeric Augustin2013-12-171-2/+2
| | | | | | | | | | | | | | | 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.
* Fixed #21551 -- Reenabled loading fixtures from subdirectoryClaude Paroz2013-12-071-1/+5
| | | | | | This was a regression in Django 1.6 that was only partially restored in 839940f27f. Thanks Jonas Haag for the report.
* Fixed #21457 -- Allowed fixture file name to contain dotsClaude Paroz2013-11-181-9/+8
| | | | Thanks Keryn Knight for the report.
* Fixed #21351 -- Replaced memoize with Python's lru_cache.Bouke Haarsma2013-11-111-5/+4
| | | | | | | | | | Replaced the custom, untested memoize with a similar decorator from Python's 3.2 stdlib. Although some minor performance degradation (see ticket), it is expected that in the long run lru_cache will outperform memoize once it is implemented in C. Thanks to EvilDMP for the report and Baptiste Mispelon for the idea of replacing memoize with lru_cache.
* Fixed flake8 E241Boryslav Larin2013-11-021-3/+3
|
* Fixed #21288 -- Fixed E126 pep8 warningsAlasdair Nicol2013-10-211-10/+10
|
* Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol2013-10-181-1/+1
|
* Fixed a number of flake8 errors -- particularly around ↵Alex Gaynor2013-09-071-1/+0
| | | | unused imports and local variables
* Fixed #20933 -- Allowed loaddata to load fixtures from ↵Florian Apolloner2013-08-211-1/+1
| | | | relative paths.
* Merge remote-tracking branch 'core/master' into ↵Andrew Godwin2013-08-091-6/+8
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * Fixed #18213 -- Allowed empty fixtures (emit a warning ↵Przemek Lewandowski2013-07-291-5/+7
| | | | | | | | rather than raising an exception).
| * Fixed #14300 -- Fixed initial SQL location if models is ↵Tim Graham2013-07-241-1/+1
| | | | | | | | | | | | a package. Thanks al_the_x for the report and fheinz for the draft patch.
* | Rename allow_syncdb to allow_migrateAndrew Godwin2013-07-301-1/+1
|/
* Fixed loaddata for Django checkouts with non ASCII chars ↵Florian Apolloner2013-06-031-1/+2
| | | | in the name.
* Fixed small regression from 51aa000378.Aymeric Augustin2013-06-031-1/+1
| | | | | | A test failed if the path to the Django checkout contained a dot. Refs #20485.
* Fixed #20485 -- Refactored loaddata for speed.Aymeric Augustin2013-06-021-140/+166
| | | | Thanks Anssi for reporting this performance bottleneck.
* Fixed #18990 -- Loaddata now complains if fixture ↵Senko Rasic2013-05-191-1/+2
| | | | | | | | | | | | | | doesn't exist If the fixture doesn't exist, loaddata will output a warning. The fixture named "initial_data" is exceptional though; if it doesn't exist, the warning is not emitted. This allows syncdb and flush management commands to attempt to load it without causing spurious warnings. Thanks to Derega, ptone, dirigeant and d1ffuz0r for contributions to the ticket.
* Fixed #18990: Loaddata now complains if fixture doesn't ↵Senko Rasic2013-05-191-2/+9
| | | | | | | | | exist The fixture named "initial_data" is exceptional though; if it doesn't exist, the error is not raised. This allows syncdb and flush management commands to attempt to load it without causing an error if it doesn't exist.
* Fixed loaddata command, broken in the previous merge.Aymeric Augustin2013-03-111-0/+2
|
* Used commit_on_success_unless_managed in loaddata.Aymeric Augustin2013-03-111-48/+21
|
* Deprecated transaction.commit/rollback_unless_managed.Aymeric Augustin2013-03-111-1/+0
| | | | | | | | 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.
* Made transaction.managed a no-op and deprecated it.Aymeric Augustin2013-03-111-1/+0
| | | | | | | | | | | | | | enter_transaction_management() was nearly always followed by managed(). In three places it wasn't, but they will all be refactored eventually. The "forced" keyword argument avoids introducing behavior changes until then. This is mostly backwards-compatible, except, of course, for managed itself. There's a minor difference in _enter_transaction_management: the top self.transaction_state now contains the new 'managed' state rather than the previous one. Django doesn't access self.transaction_state in _enter_transaction_management.
* Fixed #19357 -- Allow non-ASCII chars in filesystem pathsClaude Paroz2012-12-081-2/+3
| | | | Thanks kujiu for the report and Aymeric Augustin for the review.
* Refactor loaddata for readability.Ramiro Morales2012-11-171-133/+140
| | | | Thanks Claude Paroz and Daniel Moisset for review and feedback.
* Cleaned up loaddata command options help textPreston Holmes2012-10-011-2/+2
|
* Fixed #9279 -- Added ignorenonexistent option to loaddataPreston Holmes2012-10-011-1/+7
| | | Thanks to Roman Gladkov for the initial patch and Simon Charette for review.
* Fixed #18196 -- Improved loaddata error messages.Claude Paroz2012-08-211-3/+9
|
* [py3] Ported django.utils.encoding.Aymeric Augustin2012-08-071-2/+2
| | | | | | | | | | | * Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
* Fixed #18269 -- Applied unicode_literals for Python 3 ↵Claude Paroz2012-06-071-1/+4
| | | | | | | compatibility. Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
* Fixed #10200 -- Raised CommandError when errors happen ↵Claude Paroz2012-06-071-31/+12
| | | | in loaddata.