Commit Graph

977 Commits

Author SHA1 Message Date
Ian Kelly bbac0cc965 Fixed #11487: pass long strings to Oracle as CLOB rather than NCLOB to prevent an encoding bug that occurs in some installations.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11285 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-21 21:20:18 +00:00
Russell Keith-Magee 8d48eaa064 Fixed #10061 -- Added namespacing for named URLs - most importantly, for the admin site, where the absence of this facility was causing problems. Thanks to the many people who contributed to and helped review this patch.
This change is backwards incompatible for anyone that is using the named URLs
introduced in [9739]. Any usage of the old admin_XXX names need to be modified
to use the new namespaced format; in many cases this will be as simple as a
search & replace for "admin_" -> "admin:". See the docs for more details on
the new URL names, and the namespace resolution strategy.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-16 16:16:13 +00:00
Russell Keith-Magee e992e57d3e Fixed #11416 -- Restored use of the never_cache decorator on admin views. Thanks to Ramiro Morales and Michael Newmann for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-13 13:46:31 +00:00
Russell Keith-Magee 52bc782621 Fixed #11107 -- Corrected the generation of sequence reset SQL for m2m fields with an intermediate model. Thanks to J Clifford Dyer for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-11 14:22:52 +00:00
Russell Keith-Magee 7ecb8b08b3 Fixed #10922 -- Corrected handling of POST data to ensure that the right objects are updated on save when the ordering field is editable. Thanks to Alex Gaynor, Karen Tracy, and Will Hardy for their contributions to this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-03 03:05:17 +00:00
Russell Keith-Magee 735309341e Fixed #10834 -- Added bucket condition to ensure that URL resolvers won't ever return None. Thanks to Chris Cahoon for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-29 14:02:17 +00:00
Russell Keith-Magee e522e61a80 Fixed #11392 -- Enforced a predictable result order for a couple of test cases. Thanks to Nathan Auch for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-29 12:29:48 +00:00
Russell Keith-Magee cbbe60c7fc Fixed #11270 -- Modified cache template tag to prevent the creation of very long cache keys. Thanks to 235 for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 15:04:00 +00:00
Russell Keith-Magee 8950a40cec Fixed #11270 -- Corrected naming conflict in templatetag test. Thanks to steveire for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 15:03:17 +00:00
Russell Keith-Magee 191203b48d Fixed #9023 -- Corrected a problem where cached attribute values would cause a delete to cascade to a related object even when the relationship had been set to None. Thanks to TheShark for the report and test case, and to juriejan and Jacob for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11009 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-15 14:30:51 +00:00
Russell Keith-Magee b38cf5db5c Fixed #11311 -- Reverted [10952], Refs #10785. Changeset [10952] caused problems with m2m relations between models that had non-integer primary keys. Thanks to Ronny for the report and test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-15 11:47:01 +00:00
Luke Plant 9294121d3c Fixed #9367 - EmailMultiAlternatives does not properly handle attachments.
Thanks to Loek Engels for the bulk of the patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-12 13:56:40 +00:00
Russell Keith-Magee d3bd3203f9 Fixed #11286 -- Ensured that dumpdata uses the default manager, rather than always using the manager called `objects`. Thanks to Marc Remolt for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-09 13:14:40 +00:00
Brian Rosner 89df572c47 Fixed #11274 -- Corrected doctests to not cause test failures due to missing newlines. Thanks Honza Kral.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-07 18:07:53 +00:00
Russell Keith-Magee 151d88af4e Fixed #11082 -- Ensured that subqueries used in an exclude(X__in=) clause aren't pre-evaluated. Thanks to Henry Andrews for the report, and clement for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10929 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-06 13:35:33 +00:00
Russell Keith-Magee fa43a32bcb Fixed #10733 -- Added a regression test for queries with multiple references to multiple foreign keys in only() clauses. Thanks to mrts for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-06 12:16:06 +00:00
Russell Keith-Magee 2416e5fefe Fixed #9479 -- Corrected an edge case in bulk queryset deletion that could cause an infinite loop when using MySQL InnoDB.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10913 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-03 13:23:19 +00:00
Gary Wilson Jr 419747d1c8 Fixed a few Python 2.3 incompatibilities that were causing test failures.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-29 05:23:50 +00:00
Gary Wilson Jr c78554b216 Added test for pickling of a model with an `ImageField`, refs #11103.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-29 04:06:09 +00:00
Gary Wilson Jr d89ba464dd Changes to `ImageFileDescriptor` and `ImageField` to fix a few cases of setting image dimension fields.
* Moved dimension field update logic out of `ImageFileDescriptor.__set__` and into its own method on `ImageField`.
 * New `ImageField.update_dimension_fields` method is attached to model instance's `post_init` signal so that:
   * Dimension fields are set when defined before the ImageField.
   * Dimension fields are set when the field is assigned in the model constructor (fixes #11196), but only if the dimension fields don't already have values, so we avoid updating the dimensions every time an object is loaded from the database (fixes #11084).
 * Clear dimension fields when the ImageField is set to None, which also causes dimension fields to be cleared when `ImageFieldFile.delete()` is used.
 * Added many more tests for ImageField that test edge cases we weren't testing before, and moved the ImageField tests out of `file_storage` and into their own module within `model_fields`.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-28 05:46:09 +00:00
Russell Keith-Magee 4567b44909 Modified a test from r10787 so that the comparison order is reliable. Thanks to Alex Gaynor and Tom Tobin for the report via IRC.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-20 00:19:13 +00:00
Karen Tracey 8c8625bde3 Fixed #11149 -- Don't call save_form_data on file-type fields multiple times when saving a model form.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-19 23:13:33 +00:00
Karen Tracey 50745cc31e Fixed #11066 -- Corrected 15 duplicate "the"s found in docs and code comments. Thanks kaikuehne.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10801 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-17 16:45:28 +00:00
Matt Boersma 56f3ed7f54 Fixed import statement in admin_views test to work with Python 2.3.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-15 15:01:40 +00:00
Russell Keith-Magee a00be66311 Fixed #11120 -- Corrected handling of inlines attached to inherited classes, broken by r10756. Thanks to George Song and Michael Strickland for the simultaneous reports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-15 12:44:51 +00:00
James Bennett bcb0d124b4 Corrected tests from [10784]; instead of retrieving two comments, it was retrieving one comment twice.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-15 02:54:55 +00:00
Jacob Kaplan-Moss d246401552 Fixed #11113: fixed a couple of issues that slipped through the cracks when comment moderation was added to `django.contrib.comments`.
The is a potentially backwards-incompatible change for users already relying on the internals of comment moderaration. To wit:

   * The moderation system now listens to the new `comment_will_be_posted`/`comment_was_posted` signals instead of `pre/post_save`. This means that import request-based information is available to moderation as it should be.
   * Some experimental code from `django.contrib.comments.moderation` has been removed. It was never intended to be merged into Django, and was completely untested and likely buggy.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-14 15:20:50 +00:00
Jacob Kaplan-Moss 3da3716252 Fixed #10348: ChangeList no longer overwrites a select_related provided by `ModelAdmin.queryset()`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-14 15:09:33 +00:00
Jacob Kaplan-Moss e508bfd27f Fixed #10992: fixed a bug saving inlines with custom primary key fields. Thanks, Zain.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10777 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-14 02:23:53 +00:00
Russell Keith-Magee 7215ffe8a4 Fixed #10243, #11043 -- Corrected handling of formsets over a ForeignKey that uses to_field, and by extension, fixed the admin for handling fields of that type. Thanks to apollo13 for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-13 14:04:29 +00:00
Jacob Kaplan-Moss d20a0834ac Fixed #9751: admin scripts now calculate the project directory correctly when the settings module is a directory with an ``__init__.py``. Thanks to Eric Holscher.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-12 21:45:03 +00:00
Karen Tracey 14a6f6cf9a Fixed #11032: close() a file explictly open()'d in a test, so that deleting the file tree it is in doesn't fail on Windows. Thanks bthomas for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-11 16:13:29 +00:00
Jacob Kaplan-Moss 2b0903b2c4 Fixed #10404: ImageField height_field and width_field options no longer depend on putting the image field after the height/width fields as they did after r9766.
This bug actually exposed a related handful of inconsistancies in the underlying file handling and wraping, so a few related changes are in here as well:

    * Dimensions are also now calculated the moment the image is assigned to the field instead of upon save.
    * The base `File` object now when possible delegates its closed attribute down to the os-level file it wrapps.
    * In-memory files' `close()` now is a no-op. Without this certain APIs that should be able to handle in-memory files were failing.
    * Accessing `FieldFile.closed` used to open the file. That's silly, and it doesn't any more.
    * Some over-eager error handling was squishing some errors that would normally be raised. One unit test was incorrectly depending on this behavior, so the test was removed.

Thanks to Armin Ronacher for much of this work.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-11 09:57:19 +00:00
Russell Keith-Magee 8c2db4ab0f Fixed #10906 -- Added a check for PostgreSQL pre 8.2 when using StdDev/Variance aggregates. Thanks to Richard Davies for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-10 09:22:53 +00:00
Russell Keith-Magee b97178f7ec Fixed #10842 -- Corrected parsing of version numbers for PostgreSQL 8.4beta series. Thanks to hgdeoro for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-10 09:22:06 +00:00
Russell Keith-Magee 5663258de1 Fixed #10792 -- Ensured that ModelChoiceFields don't provide an empty option when the underlying field has blank=False and there is a default value available. Thanks to carljm for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-10 07:44:27 +00:00
Russell Keith-Magee 2c2871b7c3 Fixed #11042 -- Corrected admin inlines for inherited models. Thanks to jsmullyan for the report, and mir for helpful triage work. Patch includes regression test for #8093, and a commented out test for #10992.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-09 11:40:13 +00:00
Jacob Kaplan-Moss c40f715257 Fixed #10687: fixed request parsing when upload_handlers is empty. Thanks, Armin Ronacher.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 17:22:34 +00:00
Jacob Kaplan-Moss 68a890e79f Fixed #7712, #9404, #10249, #10300: a light refactor and cleanup of file storage and the `File` object. Thanks to Armin Ronacher and Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 15:08:09 +00:00
Jacob Kaplan-Moss 2af75b485d Fixed #10825: fixed the 'U' format code to dateformat (and the date/now filter/tag). Thanks to gsong and mir.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 13:39:37 +00:00
Jacob Kaplan-Moss 23fa913676 Fixed #10448: correcting errors on "save as new" now correctly create a new object instead of modifying the old one. Thanks, bastih.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 12:53:14 +00:00
Jacob Kaplan-Moss 155ab07a5d Fixed #10188: prevent newlines in HTTP headers. Thanks, bthomas.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 11:15:23 +00:00
Jacob Kaplan-Moss a7faf6424a Fixed #8817: get_image_dimensions correctly closes the files it opens, and leaves open the ones it doesn't. Thanks, mitsuhiko.
While I was at it, I converted the file_storage doctests to unit tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 10:56:51 +00:00
Jacob Kaplan-Moss 614d881450 Fixed #10750: respect comment=False in inline formsets. Thanks, Koen Biermans.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 09:59:46 +00:00
Gary Wilson Jr 59507753c7 Fixed #9610 -- Fixed duplicate uploaded file name mangling when directory contained a dot and file didn't. Based on patches from fadlytabrani and adurdin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 05:50:31 +00:00
Jacob Kaplan-Moss 7caf21aa2e Make sure that all uses of max_length in the test suite use values smaller than 255. If we use max_length > 255 the test suite can't be run on MySQL 4.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 18:06:22 +00:00
Jacob Kaplan-Moss fb9ac5729d Fixed #10153: foreign key `gte` and `lte` lookups now work. Thanks, joelhooks and adurdin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 16:12:08 +00:00
Jacob Kaplan-Moss bfdb7d26aa Fixed #9659: fixed `wsgi.file_wrapper` in the builtin server. Thanks, mitsuhiko.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 15:39:06 +00:00
Matt Boersma 523da3801d Fixed test suite on Oracle that was broken by using keyword "date" as a field name. Refs #4140 and #10422.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 14:48:04 +00:00
Russell Keith-Magee ae7d9bfad2 Fixed #10899 -- Ensured that log messages for deletions in the admin contain useful descriptions. Thanks to Jeremy Dunck for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 13:10:59 +00:00