Commit Graph

227 Commits

Author SHA1 Message Date
Claude Paroz 4a103086d5 Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz 6fd1950a4e Fixed #10200 -- Raised CommandError when errors happen in loaddata. 2012-06-07 10:32:10 +02:00
Claude Paroz f0664dc8ae Made TestNoInitialDataLoading pass with MySQL (Refs #15926) 2012-06-06 13:54:40 +02:00
Honza Kral fedac99c85 Fixed #15926 -- Added option --no-initial-data to syncdb and flush.
Thanks msiedlarek, jpaugh64 and vlinhart!
2012-06-05 16:46:15 +02:00
Ramiro Morales 72130385bf Made inspectdb tests deal with a smaller generated models.py file.
Implemented this by adding a stealth table_name_filter option for the
command.
2012-06-01 21:46:07 -03:00
Claude Paroz cc4b4d9fd3 Used CommandError in createcachetable command.
Raising CommandError whenever a management command meets an error
condition is the standard way to handle errors in commands.
2012-05-27 23:03:21 +02:00
Claude Paroz 12f4bd74fc Removed unneeded sys import added in previous commit 2012-05-26 11:53:33 +02:00
Claude Paroz 3b5083bee5 Fixed #5423 -- Made dumpdata output one row at a time.
This should prevent storing all rows in memory when big sets of
data are dumped.
See ticket for heroic contributors.
2012-05-26 11:43:37 +02:00
Claude Paroz edfa95c22f Specified when open should use binary mode.
Thanks Vinaj Sajip for the help of his django3 branch.
2012-05-25 20:43:43 +02:00
Claude Paroz 822d6d6dab Fixed #18325 -- Wrapped self.stdout/stderr in OutputWrapper class 2012-05-19 13:51:54 +02:00
Claude Paroz bb4452f212 Fixed #18019 -- Use threaded runserver only when database supports it. 2012-05-15 09:21:10 +02:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Anssi Kääriäinen 4fdd378beb Skip model validation when models are known good.
In some situations Django calls model validation when the models are
already known good. This is most visible in tests, which use flush
and loaddata commands. This resulted in around 10% overhead when
running tests under sqlite.
2012-05-01 08:40:04 +03:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Anssi Kääriäinen 527cce80dc Made table_names() output sorted.
Fixed #18218 -- previously Django's introspection table_names() and
get_table_list() methods did not sort the output consistently. This
resulted in random order of inspected models.

This commit also removed all external usages of get_table_list().
table_names() should be used instead.

Thanks to claudep for patch and report.
2012-04-29 02:11:55 +03:00
Adrian Holovaty 21f11e5280 Updated compilemessages and makemessages management commands to change SVN->Git references 2012-04-27 22:37:59 -05:00
Claude Paroz ddc5d59c6a Fixed #15076 -- Quoted ForeignKey target class names in inspectdb when class is defined below.
Thanks saschwarz for the report, jeff@deserettechnology.com for the initial patch and Ramiro Morales for the review. 


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-27 06:56:31 +00:00
Claude Paroz c34d069a75 Removed direct print statements from django management commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-26 19:56:20 +00:00
Claude Paroz 5c53e30607 Fixed #18035 -- Removed deprecated AdminMediaHandler, as per official deprecation timeline. Thanks Jannis Leidel and Ramiro Morales for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-08 21:13:32 +00:00
Aymeric Augustin d38690796c Removed the deprecated reset and sqlreset management commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 12:38:11 +00:00
Claude Paroz 23d3459761 Fixed #17965 -- Definitely dropped support for Python 2.5. Thanks jonash for the initial patch and Aymeric Augustin for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 08:24:29 +00:00
Claude Paroz 9383a2761c Removed with_statement imports, useless in Python >= 2.6. Refs #17965. Thanks jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Ramiro Morales c6425aafa5 Fixed #17820 -- Fixed more occurrences of redundant handling of management commands options.
They had been missen in the first attempts or had been introduced afterwards.

Refs #13760, #10080, #17799.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-10 17:50:59 +00:00
Carl Meyer 89b57a7c77 Added missing newline to makemessages output. Thanks Florian Apolloner for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 20:34:46 +00:00
Paul McMillan 239e41f7c5 Cleanup to use get_random_string consistently.
Removes several ad hoc implementations of get_random_string()
and removes an innapropriate use of settings.SECRET_KEY.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-23 21:39:12 +00:00
Ramiro Morales a411242e94 Fixed #17676 -- Fixed introspection of column names that start with digit(s).
Thanks Gandalfar for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 20:53:48 +00:00
Julien Phalip ad8ebb7006 Fixed #8317 -- Corrected the inspectdb management command to properly set `primary_key=True` and `unique=True` on foreign keys. Thanks to bthomas for the report and patch, and to David Gouldin for the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-05 07:51:37 +00:00
Ramiro Morales 9b762d170a Made a couple of idiomatic changes in makemessages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 22:12:58 +00:00
Ramiro Morales 2894ec71c9 Removed hard-coded root tree path in makemessages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 21:44:31 +00:00
Ramiro Morales a4f68c1b40 Fixed undefined variable name in makemessages command code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 20:02:46 +00:00
Jannis Leidel c6065545ef Fixed #17628 -- Extended makemessages command to also ignore directories when walking, not only when looking for files. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 18:27:24 +00:00
Jacob Kaplan-Moss e8e4293a48 Fixed #17078: properly invoke IPython 0.12.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-19 17:38:56 +00:00
Luke Plant 4e29b70b9d Fixed #17530 - Fixture loading with deferred constraints broken for Postgres for fixtures from multiple dirs/files
Thanks to claudep for the review.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-14 17:26:32 +00:00
Aymeric Augustin 19c544ff42 Fixed #17300 -- Prevented createcachetable from crashing when the cache table already exists. Thanks Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 20:00:30 +00:00
Ramiro Morales 953a471a21 Made sure `manage.py help test` works.
Thanks shige DOT abe AT nasa DOT gov for the report.

Fixes #17477. Refs r16352.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-29 01:18:30 +00:00
Ramiro Morales 7c6e265a9f Refactored the internals of makemessages management command for better readability.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 11:24:35 +00:00
Jannis Leidel a9a0f0b03f Fixed #17042 -- Extended startproject and startapp management commands to better handle custom app and project templates. Many thanks to Preston Holmes for his initial patch and Alex Gaynor, Carl Meyer, Donald Stufft, Jacob Kaplan-Moss and Julien Phalip for code reviewing.
* Added ability to pass the project or app directory path as the second argument
* Added ``--template`` option for specifying custom project and app templates
* Cleaned up admin_scripts tests a little while I was there

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 22:38:02 +00:00
Julien Phalip 2f02a05ffb Fixed #2879 -- Added support for the integration with Selenium and other in-browser testing frameworks. Also added the first Selenium tests for `contrib.admin`. Many thanks to everyone for their contributions and feedback: Mikeal Rogers, Dirk Datzert, mir, Simon G., Almad, Russell Keith-Magee, Denis Golomazov, devin, robertrv, andrewbadr, Idan Gazit, voidspace, Tom Christie, hjwp2, Adam Nelson, Jannis Leidel, Anssi Kääriäinen, Preston Holmes, Bruno Renié and Jacob Kaplan-Moss.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 08:33:58 +00:00
Julien Phalip 45e3dff5ac Ensured that `makemessages` doesn't leave any temporary file over if the parsing of a template file fails. Refs #8536.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-21 15:35:58 +00:00
Aymeric Augustin 694bc0f22b Fixed #16397 -- Respected the --traceback flag in BaseCommand. This should make import loops easier to debug. Refs #11667, #17369.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 10:03:09 +00:00
Aymeric Augustin 119e188717 Upgraded manage.py cleanup to be compatible with time zone support. See also r17121.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 11:04:37 +00:00
Aymeric Augustin d0eb4693ab Fixed #15255 -- Ensured createcachetable honors database routers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-19 19:56:31 +00:00
Julien Phalip c3df840c20 Fixed #16903 -- Added `--no-location` option to the `makemessages` command to not write '#: filename:line' comment lines in language files. Thanks to alpar for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-11 13:07:14 +00:00
Ramiro Morales bebbc9e4a5 Made a couple of changes for readability and correctness in loaddata.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17055 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 22:32:28 +00:00
Ramiro Morales 345be05622 Enhanced loaddata error message printed when no DB fixture is provided.
Fixes #7043 by fixing the last code path where a misleading 'No fixtures found.' error message was being shown.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17051 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 14:47:45 +00:00
Carl Meyer d89be53d95 Fixed #17099 -- Removed an out-of-date warning and some unused code, now that startapp doesn't require creating app inside project. Thanks ptone for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-24 20:50:39 +00:00
Julien Phalip 59c051d170 Fixed #13760 -- Cleaned up unnecessary default option 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
2011-10-23 03:43:43 +00:00
Carl Meyer 145a77edc9 Fixed #16360 -- Added WSGI entrypoint to startproject layout, and enabled internal servers (runserver and runfcgi) to use an externally-defined WSGI application. Thanks to Armin Ronacher, Jannis Leidel, Alex Gaynor, ptone, and Jacob Kaplan-Moss.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 04:30:10 +00:00
Carl Meyer 38f1fe3b35 Fixed #15372 -- Switched to a startproject default layout that allows us to avoid sys.path hacks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 05:56:15 +00:00
Paul McMillan d0979a5faf Fixed #6011 -- Improved help text for flush command. Thanks Julien for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 05:21:51 +00:00