Commit Graph

3300 Commits

Author SHA1 Message Date
Malcolm Tredinnick 5141b67a19 Reverted [7986].
It turns out that we need to treat filename creation/display (in
particular, the upload_to path) differently depending upon whether the value is
out of the database or provided by other code and there's no reliable way to
determine that at the moment (although some later proposed changes might alter
that). So calling get_FIELD_filename on an unsaved model with a changed file
attribute will not necessarily return the same result as after the save().

Refs #5619. Fixed #7843.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 22:26:32 +00:00
Nicola Larosa a4619944dc it translation: updated to r7996
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 20:02:46 +00:00
Nicola Larosa be922f1ba5 it translation: regenerated po file, now let's get to work
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7996 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:54:09 +00:00
Malcolm Tredinnick 189c704ae6 Revert [7991] - [7993]. I was committing from the wrong branch. Sorry 'bout
that, folks. :-(


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:37:55 +00:00
Malcolm Tredinnick be36750163 Fixed #7774 -- Updated Norwegian translation from jonklo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:32:29 +00:00
Malcolm Tredinnick ff68e85b8e Starting to do the reverse() threading stuff.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:32:18 +00:00
Malcolm Tredinnick 99bbaa0090 Allow avoidance of the Apache mod_rewrite undo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:32:12 +00:00
Malcolm Tredinnick b653cdcfb2 First part of setting request.path correctly.
Still needs:
    - testing
    - docs changes
    - some way of fixing reverse().


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:32:01 +00:00
Malcolm Tredinnick e8dd3855c1 Fixed #7761 -- Updated Georgian translation. Thanks, David Avsajanishvili.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:26:47 +00:00
Malcolm Tredinnick 8ac9cbee2f Fixed #7763 -- Added a Romanian localflavor. Thanks, MihaiD.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:22:44 +00:00
Malcolm Tredinnick 795b6a1271 Fixed #7471 -- If the 400 response handler raises an exception, pass control to
the 500 handler (if that then raises an exception, it's just not your day).

Patch from Leah Culver.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 18:49:49 +00:00
Malcolm Tredinnick a103786971 Fixed #5619 -- Return the same path in get_FOO_filename() before and after a
model is saved (i.e. make sure the upload prefix is prepended in both cases).

Patch from wreese@gmail.com. Tests from Leah Culver.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 18:35:11 +00:00
Malcolm Tredinnick c09351aec6 Fixed #6965 -- Sped up the urlize and urlizetrunc filters. A nice patch from Andrew Badr.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 18:05:22 +00:00
Russell Keith-Magee 0cffff024b Fixed #7441 - Improved the doctest OutputChecker to be more lenient with JSON an XML outputs. This is required so that output ordering that doesn't matter at a semantic level (such as the order of keys in a JSON dictionary, or attributes in an XML element) isn't caught as a test failure. Thanks to Leo Soto for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 14:46:55 +00:00
Russell Keith-Magee 649463dd34 Fixed #4412 -- Added support for optgroups, both in the model when defining choices, and in the form field and widgets when the optgroups are displayed. Thanks to Matt McClanahan <cardinal@dodds.net>, Tai Lee <real.human@mrmachine.net> and SmileyChris for their contributions at various stages in the life of this ticket.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 07:53:02 +00:00
Russell Keith-Magee 69ac815a41 Fixed #7828 -- Removed some unnecessary imports from admin widgets. Thanks to Julien for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 02:26:58 +00:00
Jacob Kaplan-Moss 46786b4193 Fixed #7741: django.newforms is now django.forms. This is obviously a backwards-incompatible change. There's a warning upon import of django.newforms itself, but deeper imports will raise errors.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 01:22:26 +00:00
Jacob Kaplan-Moss 88ae2d44e0 Fixed django.VERSION after NFA merge.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 00:07:47 +00:00
Brian Rosner a19ed8aea3 Merged the newforms-admin branch into trunk.
This is a backward incompatible change. The admin contrib app has been
refactored. The newforms module has several improvements including FormSets
and Media definitions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 23:54:34 +00:00
Gary Wilson Jr dc375fb0f3 Refs #3639 -- Minor docstring correction, it's a function not a method.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 23:52:18 +00:00
Malcolm Tredinnick 436ef181f3 Fixed #5552 -- Raise an error, rather than failing silently, when DATABASE_NAME
is not specified for SQLite.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 22:36:31 +00:00
Adrian Holovaty 13643a7f5d Fixed #7816 -- Fixed error in a few DeprecationWarnings. Thanks, leahculver
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 21:45:25 +00:00
Jacob Kaplan-Moss 7997133a3d Fixed #3639: updated generic create_update views to use newforms. This is a backwards-incompatible change.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 19:45:00 +00:00
Malcolm Tredinnick c681f4070c Removed the mysql_old backend. It smells bad and has no friends.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 17:38:53 +00:00
Adrian Holovaty d261c1d000 Fixed #7805 -- Removed ImageField.get_internal_type() because it doesn't offer anything beyond FileField's implementation. Thanks, Gulopine
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 04:34:47 +00:00
Adrian Holovaty df2b19cc17 Fixed #1443 -- Django's various bits now support dates before 1900. Thanks to SmileyChris, Chris Green, Fredrik Lundh and others for patches and design help
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 03:47:27 +00:00
Adrian Holovaty f6fafc02c8 Improved LocalTimezone._isdst() to handle dates before approximately 1901-12-01 (the specific cutoff date is platform-specific). Refs #1443
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7945 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 03:45:30 +00:00
Russell Keith-Magee 1107e6b479 Fixed #7751 -- Added check to allow for the fact that autocommit can be a property, rather than a function on certain database backends. Thanks to Leo Soto for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-17 13:24:05 +00:00
Malcolm Tredinnick 52fdedba48 Fixed #7759 -- Fixed QuerySet.count() when the results cache was only partially
populated.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-16 23:17:29 +00:00
Malcolm Tredinnick 57bb10e6c4 Refactored the HTTP 500 error response creation slightly. Provides the ability
for subclassing that piece of the processing path.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-15 19:17:49 +00:00
Malcolm Tredinnick e7e4b8b0f7 Fixed #6862 -- Refactored debug traceback extraction into an easy-to-use class.
Aside from being a little easier to read and use, this means you could subclass
a request/response handler class (from django.core.handlers) to add your own
traceback extraction handling in non-DEBUG environments and reuse this code.
Thanks, Ned Batchelder.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-15 18:47:49 +00:00
Malcolm Tredinnick 3b37c8151a Fixed #7411 -- worked around some possible transaction conflicts in SQLite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-15 18:47:32 +00:00
Russell Keith-Magee 32b8c3e1c0 Fixed #7718 -- Added a naive implementation of sorted() for Python 2.3 compatibility, and modified test cases to import the function when required.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7914 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-13 08:48:18 +00:00
Gary Wilson Jr dee7de0c23 Re-organized imports, removing a couple that were unused.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7912 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-13 01:22:31 +00:00
Gary Wilson Jr 1bb8809561 Added a docstring to CyclicDependency exception class.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7911 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-13 01:17:23 +00:00
Malcolm Tredinnick e47d8e7fb1 Fixed #7734 -- Fixed a Python 2.3 compatibility problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 23:25:22 +00:00
Jacob Kaplan-Moss 476d5f2c0d Fixed #7675: corrected TemporaryUploadedFile.temporary_file_path. Thanks, Florian Apolloner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 20:43:52 +00:00
Jacob Kaplan-Moss e63f8bf655 Fixed #7673: make sure to rewind uploaded image data when validating ImageFields. Thanks, Mike Axiak.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7907 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 20:43:38 +00:00
Jacob Kaplan-Moss 5f73e2c4fa Fixed #7667: fixied FileField.save_file for inline related objects. This is really just papering over a bigger problem that should get fixed either by newforms-admin or the file-storage refactoring, but this fix makes the admin work until either of those things happen. Thanks, oggy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7906 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 20:43:28 +00:00
Jacob Kaplan-Moss c121ff4046 Fixed #7635: do a better job checking for infinite loops in multi-part MIME parsing. Thanks, Mike Axiak.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 20:43:15 +00:00
Nicola Larosa f5bf3d9e99 it locale: translated two new language names
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 19:00:38 +00:00
Nicola Larosa 4dbaf2c952 it locale: updated lots of line numbers only
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 18:55:58 +00:00
Malcolm Tredinnick 52d985fac3 Fixed a bozo bug from [7885]. Fixed #7698.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 11:01:57 +00:00
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 c742afb3b2 Removed a FIXME that isn't really a problem any longer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 12:44:04 +00:00
Malcolm Tredinnick 2b193f6100 Fixed #7698 -- Handle '0' correctly when used as the upper bound of a slice.
Based on a patch from enoksrd.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 12:43:27 +00:00
Malcolm Tredinnick 7936c0b917 Fixed #7448 -- Convert "in" filters to pass in the correct values for datetimes
and similar complex objects.

Based on patches from cgrady and alexkosholev. Refs #7707.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 09:00:35 +00:00
Malcolm Tredinnick 1e00458521 Fixed #7682 -- Added a work around to keep existing admin alive until
newforms-admin merges (to handle changes in [7790]).

This code becomes irrelevant in a non-oldforms world, so even if it's not quite
correct, it will do for now. Based on a patch from puyb@puyb.net and Karen
Tracey.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 07:34:11 +00:00