Commit Graph

707 Commits

Author SHA1 Message Date
Adrian Holovaty 13061bf20b Refactored get_start_transaction_sql() to DatabaseOperations.start_transaction_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 00:24:03 +00:00
Adrian Holovaty 147e99a08a Refactored get_sql_sequence_reset() to DatabaseOperations.sequence_reset_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 00:21:10 +00:00
Adrian Holovaty aaed6e04ec Refactored get_sql_flush() to DatabaseOperations.sql_flush(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 00:15:53 +00:00
Adrian Holovaty e4b7e369dd Refactored get_max_name_length() to DatabaseOperations.max_name_length(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:53:39 +00:00
Adrian Holovaty 23a736dca9 Refactored get_drop_foreignkey_sql() to DatabaseOperations.drop_foreignkey_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:07:34 +00:00
Adrian Holovaty 8e84d35d38 Refactored get_deferrable_sql() to DatabaseOperations.deferrable_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:03:38 +00:00
Adrian Holovaty 38b5d7f23d Began implementing BaseDatabaseOperations class for every database backend. This class will be used to hold the database-specific methods that currently live at the module level in each backend. Only autoinc_sql() has been implemented so far.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 22:29:57 +00:00
Russell Keith-Magee 04c77db2c3 Rolled out [5923]-[5925] due to breaking call_command().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5929 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-18 05:58:59 +00:00
Russell Keith-Magee 7fc5a3b2d2 Finished a sentence that didn't get committed in [5923].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5924 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-18 04:54:08 +00:00
Russell Keith-Magee 6ad0a01887 Added the ability for end users to register commands with management.py.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5923 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-18 04:51:51 +00:00
Adrian Holovaty a89e401648 Fixed 'django-admin.py syncdb' to take verbosity into account when loading initial_data fixture
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5920 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17 22:56:36 +00:00
Russell Keith-Magee 0b7f5def7f Added fix for verbosity handling in loaddata and test commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5913 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17 00:11:56 +00:00
Adrian Holovaty 9c55bbdef7 Added 'django-admin.py testserver' command and docs
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5912 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 23:05:00 +00:00
Adrian Holovaty a5400cf873 Added shutdown_message to runserver command -- a hook for specifying a message to display after the server is shut down
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5911 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 22:48:32 +00:00
Adrian Holovaty 89ebb6177d Removed some trailing space in commands/syncdb.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5909 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 19:34:25 +00:00
Adrian Holovaty e8cae6f96d Fixed bug in django.core.management.base.copy_helper, related to refactoring in [5903]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5907 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 19:14:09 +00:00
Adrian Holovaty c5505c4c8e Fixed #5182 -- Fixed missing 'import sys' in syncdb.py. Thanks, John Shaffer
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 15:14:21 +00:00
Russell Keith-Magee 83f5f700b0 Improved error handling for management.py commands, especially for no argument or non-applabel argument commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 14:34:01 +00:00
Russell Keith-Magee 296d8d4553 Fixed #5179 -- Added missing kwargs to startapp command. Thanks for the report, Vsevolod Solovyov <vsevolod.solovyov@gmail.com>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 13:41:42 +00:00
Russell Keith-Magee d5e695cd89 Fixed #5178 -- Added missing 'import sys' in management/commands/test.py. Thanks for picking this up, michal@plovarna.cz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 11:06:49 +00:00
Adrian Holovaty 01adbb55e6 Major refactoring of django.core.management -- it's now a package rather than a 1730-line single module. All django-admin/manage.py commands are now stored in separate modules. This is backwards-incompatible for people who used django.core.management functions directly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 06:06:55 +00:00
Malcolm Tredinnick ce151bb8e4 Fixed #5156 -- Added some translation calls to a couple of missed words. Based on a patch from dAniel hAhler.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5895 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-15 12:09:32 +00:00
Adrian Holovaty 9b99a60cfa Made some negligible formatting changes to django/core/management.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-14 21:44:39 +00:00
Malcolm Tredinnick 534671a46f Fixed #4933 -- Fixed a typo and reformatted a fairly long line in passing. Thanks, Ludvig Ericson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 10:29:59 +00:00
Malcolm Tredinnick 6d31e431c3 Fixed #4909 -- Fixed a race condition with middleware initialisation in multi-threaded setups. Thanks, colin@owlfish.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5868 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 10:24:05 +00:00
Adrian Holovaty f128c7bbb7 Fixed #5011 -- Fixed usage of ungettext in hasNoProfanities validator. Thanks, tzellman@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 03:27:57 +00:00
Malcolm Tredinnick 1777e74d2a Fixed #4910 -- Allow Unicode content to be passed in for text-based e-mail
attachments. Thanks, djoume@taket.org.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-11 12:10:07 +00:00
Malcolm Tredinnick 01906de5c2 Fixed #4827 -- Fixed a problem when converting Unicode table names to upper-case in Oracle backend. Based on a patch from timchen119@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-11 11:11:16 +00:00
Adrian Holovaty 3c733bb690 Fixed #5071 -- Fixed 'global name ugettext is not defined' error in django.core.validators. Thanks, Marco Bonetti
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-06 05:07:38 +00:00
Adrian Holovaty e301d8992c Fixed #5082 -- Enabled tab completion in 'django-admin.py shell' for objects that were imported into the global namespace at runtime. Thanks, dusk@woofle.net
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-06 05:04:27 +00:00
Gary Wilson Jr 212ee65be7 Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms `FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 05:14:46 +00:00
Russell Keith-Magee 650cea9170 Fixed #4460 -- Added the ability to be more specific in the test cases that are executed. This is a backwards incompatible change for any user with a custom test runner. See the wiki for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-28 04:02:52 +00:00
Russell Keith-Magee 1b7fe09660 Fixed #3771 -- Modified the test runner to observe the --noinput argument controlling script interactivity. This means that test scripts can now be put in a buildbot environment. This is a backwards incompatible change for anyone that has written a custom test runner. Thanks for the suggestion, moof@metamoof.net.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-23 12:14:32 +00:00
Russell Keith-Magee 7cc2bf2f03 Fixed #4304 -- Modified sys.exit to os._exit to make sure development server quits when an error occurs attempting to bind to the requested port (e.g., if another server is already running). Thanks, Mario Gonzalez <gonzalemario@gmail.com>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-21 03:30:38 +00:00
Russell Keith-Magee 3fef1f4c8d Fixed #4558 -- Modified XML serializer to handle whitespace better around None tags. Thanks to Bill Fenner <fenner@gmail.com> for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5727 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 12:07:58 +00:00
Adrian Holovaty 0827f4ac7e Simplified the indent level in management.py _get_sql_model_create() by using a 'continue' statement rather than nesting everything in an 'if'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 06:34:26 +00:00
Adrian Holovaty ac2b9f2a3f Added a db_type() method to the database Field class. This is a hook for calculating the database column type for a given Field. Also converted all management.py CREATE TABLE statements to use db_type(), which made that code cleaner. The Field.get_internal_type() hook still exists, but we should consider removing it at some point, because db_type() is more general. Also added docs -- the beginnings of docs on how to create custom database Field classes. This is backwards-compatible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 06:28:56 +00:00
Malcolm Tredinnick c92ce31d60 Fixed #4898 -- Fixed a precendence problem when constructing HTTP Date header.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-17 04:22:11 +00:00
Malcolm Tredinnick 2679bc0304 Fixed #4845 -- Fixed some problems with Unicode usage and caching. Thanks,
Jeremy Dunck.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-16 09:36:10 +00:00
Malcolm Tredinnick 5dd9a2ab38 Fixed #4199 -- Changed date formatting in HTTP expires header to be spec
compliant. Thanks, Chris Bennett.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-16 03:50:22 +00:00
Gary Wilson Jr a41c03345e Changed imports to adhere to PEP 8.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-15 06:29:45 +00:00
Gary Wilson Jr ae7f04caab Fixed #3012 -- Changed the locmem cache backend to use pickle instead of deepcopy to make it compatible with iterators (which cannot be copied). Patch from Sundance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-15 06:24:54 +00:00
Malcolm Tredinnick a9a04ca8f6 Fixed #4731 -- Changed management.setup_environ() so that it no longer assumes
the settings module is called "settings". Patch from SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-14 14:47:14 +00:00
Malcolm Tredinnick 53e3f76d6e Fixed #4839 -- Added __repr__ methods to URL classes that show the pattern they
contain. Thanks, Thomas Güttler.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13 09:14:51 +00:00
Malcolm Tredinnick 92f54aff7a Fixed #4807 -- Fixed a couple of corner cases in decimal form input validation.
Based on a suggestion from Chriss Moffit.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5680 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13 09:09:59 +00:00
Russell Keith-Magee 2d6d20def7 Fixed #4459 -- Added 'raw' argument to save method, to override any pre-save processing, and modified serializers to use a raw-save. This enables serialization of DateFields with auto_now/auto_now_add. Also modified serializers to invoke save() directly on the model baseclass, to avoid any (potentially order-dependent, data modifying) behavior in a custom save() method.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5658 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12 07:45:35 +00:00
Malcolm Tredinnick cc1a4f031c Fixed #4823 -- Fixed a Python 2.3 incompatibility from [5636] (it was even
demonstrated by existing tests, so I really screwed this up).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-10 12:02:06 +00:00
Gary Wilson Jr 0927ab92b2 Fixed #4812 -- Fixed an octal escape in regular expression that is used in the `isValidEmail` validator, thanks batchman@free.fr.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-10 03:26:26 +00:00
Malcolm Tredinnick 5a32b3ac2c Fixed #4798-- Made sure that function keyword arguments are strings (for the
keywords themselves) when using Unicode URL patterns.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@5636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-08 11:22:53 +00:00
Malcolm Tredinnick b6812f2d9d Fixed reverse URL lookup using functions when the original URL pattern was a
string. This is now just as fragile as it was prior to [5609], but works in a
few cases that people were relying on, apparently.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5632 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-08 00:39:32 +00:00