Commit Graph

115 Commits

Author SHA1 Message Date
Russell Keith-Magee b038abe1fe Fixed #7421 -- Corrected the condition used during syncdb to establish that a management module is or isn't available. This is to satisfy non-CPython implementations which can use different error messages. Thanks to Maciej Fijalkowski (fijal) for his help confirming the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 15:08:09 +00:00
Russell Keith-Magee bbb384366f Fixed #7597 -- Added code to force the re-opening of the cursor connection, just in case a post-syncdb handler closes it. Thanks to keithb for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 14:06:59 +00:00
Russell Keith-Magee 8e0b6bdcd5 Fixed #6017 -- Modified the Lax parser to allow --settings and the other core management arguments to appear anywhere in the argument list. Thanks to Todd O'Bryan for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 13:18:19 +00:00
Malcolm Tredinnick 25f2cfb7cb Fixed #7643 -- Fixed an oversight from [7844].
Now makemessages works in projects again. Based on a patch from Horst Gutmann.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 12:55:24 +00:00
Malcolm Tredinnick 3cfa3cbd07 Fixed #5522 -- Moved make-messages, compile-messages and daily-cleanup into django-admin.py.
They are now called  "makemessages", "compilemessages" and "cleanup". This is
backwards incompatible for make-messages.py and compile-messages.py, although
the old executables still exist for now and print an error pointing the caller
to the right command to call.

This reduces the number of binaries and man pages Django needs to install.

Patch from Janis Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 06:39:44 +00:00
Russell Keith-Magee 9eaa05912c Fixed #7572 -- Force the closure of the database connection at the end of fixture loading as a workaround for MySQL bug #37735. Thanks to Simon Litchfield for his help in narrowing down this issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 12:18:29 +00:00
Malcolm Tredinnick f9df4d1435 Make sure we only create the minimum number of table indexes for MySQL.
This patch simplifies a bunch of code for all backends and removes some
duplicate index creation for MySQL, in particular (versions 4.x and later).
Patch from Nis Jørgensen.

Fixed #5671, #5680, #7170, #7186.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 04:46:59 +00:00
Russell Keith-Magee 5d09d8769d Fixed #6650 -- Added UTF-8 encoding to SQL output provided by management commands. Thanks to farcaller for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-19 14:38:56 +00:00
Russell Keith-Magee 090aeee399 Fixed #6719 -- Added a --traceback option to syncdb to provide a stack trace when custom SQL loading fails. Also added documentation for the --traceback option. Thanks to guettli for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-19 13:24:39 +00:00
Adrian Holovaty ee882b6abd Fixed #6497 -- Improved fixture error reporting by displaying the entire traceback. Also, SystemExit and KeyboardInterrupt now exit the script properly. Thanks for the patch, Bastian Kleineidam
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 04:00:08 +00:00
Adrian Holovaty a0a06d1a89 Fixed #6654 -- Slightly refactored the way 'startproject' and 'startapp' check for existing Python modules. Thanks, i_i
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7652 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 03:56:48 +00:00
Russell Keith-Magee 1c47b21f52 Fixed #7436 -- Corrected a fix from [7615] that broke some test cases. Don't you just love unintended consequences? Thanks to telenieko for the report, and the buildbot for pointing out my mistake.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7629 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-13 00:08:50 +00:00
Adrian Holovaty acf888b4ba Fixed #7421 -- Improved syncdb implementation not to check for exact exception text, in case of alternate Python implementation. Thanks, anto.cuni@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-12 04:22:02 +00:00
Russell Keith-Magee 9c50495464 Fixed #7254 -- Added an '--exclude' option to dumpdata, allowing specific applications to be removed from the dump output. Thanks to Carl Karsten for the idea and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-11 14:01:35 +00:00
Russell Keith-Magee 511e01d978 Fixed #4371 -- Improved error checking when loading fixtures. Code now catches explicitly named fixture formats that are not supported (e.g, YAML fixtures if you don't have PyYAML installed), and fixtures that are empty (which can happen due to XML tag errors). Thanks to John Shaffer for the suggestion, and Keith Bussell for his work on the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-08 08:21:18 +00:00
Jacob Kaplan-Moss 102394b79d Fixed #6394: improved comment stripping in initial SQL files. Thanks, Thomas Guttler.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-08 05:38:13 +00:00
Jacob Kaplan-Moss 3de70a10c0 Fixed #6820: flush no longer fails under PostgreSQL 8.3. WARNING: In the process I renamed a couple of internal functions in django.core.management.sql, so this is a backwards-incompatible change if you were using those internal functions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-31 01:01:17 +00:00
Malcolm Tredinnick 9c52d56f6f Merged the queryset-refactor branch into trunk.
This is a big internal change, but mostly backwards compatible with existing
code. Also adds a couple of new features.

Fixed #245, #1050, #1656, #1801, #2076, #2091, #2150, #2253, #2306, #2400, #2430, #2482, #2496, #2676, #2737, #2874, #2902, #2939, #3037, #3141, #3288, #3440, #3592, #3739, #4088, #4260, #4289, #4306, #4358, #4464, #4510, #4858, #5012, #5020, #5261, #5295, #5321, #5324, #5325, #5555, #5707, #5796, #5817, #5987, #6018, #6074, #6088, #6154, #6177, #6180, #6203, #6658


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-27 02:50:16 +00:00
Ian Kelly bd3c955bd5 Added inline Oracle tablespace SQL for unique_together constraints.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-27 22:07:40 +00:00
Malcolm Tredinnick 6035af82d4 Fixed #6789 -- Added some small amount of extra protection for learners trying
to pick a name for their project. Thanks, thejaswi_puthraya.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-19 15:10:31 +00:00
Jacob Kaplan-Moss 32933d27b2 Fixed a corner case in management.setup_environ (it was triggered under Cygwin, but also perhaps could happen elsewhere). Thanks, Doug Napoleone.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-19 04:04:19 +00:00
Jacob Kaplan-Moss 50bf567675 Fixed #6374: cross-app and circular FK constraints are now detected and added correctly. Thanks, dready.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-10 22:18:50 +00:00
Gary Wilson Jr 7fbebae8c8 Fixed #6223 -- When determining if terminal supports color, don't call `isatty` if it doesn't exist, thanks mamadou.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-08 03:12:27 +00:00
Russell Keith-Magee 1e2852a15d Fixed #6420 -- Corrected the handling of the --traceback option in loaddata. Thanks, Grzegorz Lukasik <hauserx@gmail.com>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-07 13:53:49 +00:00
Russell Keith-Magee c1f45c326c Fixed #6436 -- Added check for absolute paths in fixture loading. Fixtures specified as an absolute path were being loaded multiple times. Thanks to btoll@bestweb.net for the report, fix, and catch of a duplicate ticket.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-22 12:50:10 +00:00
Russell Keith-Magee 4415f45366 Further clarification of help message for ./manage.py sqlall, this time using the same term used in the documentation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-12 01:01:27 +00:00
Russell Keith-Magee 9c80d77d7d Clarified help message for ./manage.py sqlall
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7105 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-12 00:48:37 +00:00
Gary Wilson Jr ff707f502c Fixed #6419 -- Fixed verbosity level checks in loaddata command that were raised to unobtainable levels in [6883].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-28 03:53:50 +00:00
Ian Kelly 4ab27ab119 Fixed the Oracle backend mangling colorized unique_together SQL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-04 20:26:13 +00:00
Malcolm Tredinnick b53fac8052 Fixed [6932] so that "django-admin.py help dumpdata" works again.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 11:09:56 +00:00
Malcolm Tredinnick fbf49dfcee Fixed #4431 -- Added a --traceback option for dumpdata and loaddata (which
shows how it can be used for other commands as well). Thanks, dakrauth.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 11:09:32 +00:00
Malcolm Tredinnick 3edf2ebd94 Fixed #6155 -- Fixed dumpdata to work with the default model manager (necessary
for the rare cases when the 'objects' manager might not even exist). Based on
a  patch from Michael Trier.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 09:09:08 +00:00
Malcolm Tredinnick fc413b8f61 Fixed #6110 -- Mark the python format serializer as for internal use only. Thanks, empty.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 06:53:15 +00:00
Malcolm Tredinnick 6754be48ec Generic relations should not try to drop their related table in "sqlreset".
Fixed #3480.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6921 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 06:02:35 +00:00
Adrian Holovaty 3911ee0931 Changed loaddata to display 'No fixtures found' and 'Loading XXX fixtures' only if verbosity level is greater than 2. It's not necessary to display those messages all of the time, and they're confusing to new users.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 06:52:13 +00:00
Adrian Holovaty 0c8f8f27fb Undid [6718], as it broke 'django-admin.py runserver' for a reason I haven't figured out yet
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 05:53:33 +00:00
Adrian Holovaty dca16b283d Cleaned up some docstrings and removed some unnecessary long-line breaking in django/core/management/__init__.py as I try to figure out why django-admin.py runserver has stopped working
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 05:46:46 +00:00
Malcolm Tredinnick a88ca126fc Fixed #5002 -- Fixed a small problem when running via pdb. Thanks, dummylink@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 23:26:01 +00:00
Malcolm Tredinnick 5e5768ae83 Fixed #3323 -- More robust error handling for related objetcs. Thanks, Greg
Kopka and shaleh.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 18:10:07 +00:00
Malcolm Tredinnick 81832f594d Fixed #5743 -- Tweaked the exceptions raised when importing settings so that we
cooperate with Python's standard help() function. Patch from ionut_bizau and
Ben Slavin.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6832 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 15:27:44 +00:00
Malcolm Tredinnick fc4129abbb Fixed #6038 -- Don't hide some types of errors in syncdb. Thanks, Thomas Güttler.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 15:17:14 +00:00
Adrian Holovaty 14eaaafef8 Edited docstring changes from [6480] -- moved the intense parameter definitions into comments
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6767 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-30 05:13:05 +00:00
Russell Keith-Magee 6b626800f8 Fixed #5943 -- Modified django-admin.py to work like manage.py whenever a --settings option is provided. Thanksfor the patch, Todd O'Bryan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-26 12:32:57 +00:00
Malcolm Tredinnick 595e75e8dd Fixed #5729 -- For MySQL (only), always delay the creation of foreign key
references, for all tables, until after the table has been created. This means
that when using the InnoDB storage engine, true foreign key constraints are
created (inline "REFERENCES" are ignored by InnoDB, unfortunately).

Fully backwards compatible.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 05:05:24 +00:00
Gary Wilson Jr 1a3bca2b84 Wrapped some long lines and orginized imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 16:09:52 +00:00
Gary Wilson Jr 62c574e765 Fixed #5824 -- For the `startapp` command, pass the true project name to the `copy_helper` function instead of the name of the project's parent directory.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 16:05:59 +00:00
Gary Wilson Jr 2dfad61fcc Added to docstring of `setup_environ` about what the function returns.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 16:03:24 +00:00
Malcolm Tredinnick 0ffeb3a42f Fixed "django-admin.py --version" so that it doesn't print the version string
twice.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 22:06:52 +00:00
Malcolm Tredinnick 8e87587e89 Fixed #3265 -- Made it a validation error to have field names with trailing
underscores. Allowing these would enable peopleto write ambiguous queryset
filters (plus makes parsing filters much harder).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 21:53:18 +00:00
Gary Wilson Jr 088cb3c2f3 Django coding style fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-19 01:26:09 +00:00