1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

7205 Commits

Author SHA1 Message Date
Chris Cahoon
8d979aecbe [soc2009/http-wsgi-improvements] Change HttpResponse.status_code to a property, additional test coverage. Refs #10190.
Improve charset coverage. Change HttpResponse.status_code to property, which checks for a 406 situation. This also required changes to all HttpResponse subclasses, so that their default status_code is set by _status_code, now.

Passes regression test suite, except ones related to sendfile.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-06 20:06:11 +00:00
Chris Cahoon
4d46aed514 [soc2009/http-wsgi-improvements] Merged up to r11176 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-06 19:58:45 +00:00
Chris Cahoon
33b217296e [soc2009/http-wsgi-improvements] Fix core.handler.BaseHandler.process_request.
Indentation issue.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11149 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-02 00:28:01 +00:00
Chris Cahoon
2d29d6c4f8 [soc2009/http-wsgi-improvements] Initial HttpResponseSendFile support, changes pulled from 03/21/09 patch on refs #2131.
This does not pass the included regression tests. However, since this feature
will be entirely based on these changes, which have already gone through a
great number of iterations, I thought it would be sensible to start here.

All of the work here is ymasuda, mizatservercave, and mrts (apologies if I
missed anyone). I hope to take their work
down the final stretch.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-01 02:51:48 +00:00
Chris Cahoon
4df7e8ed9f [soc2009/http-wsgi-improvements] Merged up to r11127 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-01 02:04:35 +00:00
Chris Cahoon
b0680a2ba5 [soc2009/http-wsgi-improvements] Modified tests/test_client_regress to expect correct behavior, which also fixes conflicts with charset handling in HttpResponse.
The specific cases modified test if the test client will encode the data it posts such that when writers of test views try to use the request, the data will be in the encoding they expect from the tests cases they have written. We do not expect HttpRequest to decode the incoming content yet, so the test views have to be created beforehand so that they decode using the proper codec (which they can determine from the content-type header).

Therefore, once the data is in the view and decoded, we then encode it into settings.DEFAULT_CHARSET, so we can expect normal behavior from HttpResponse, which is for the data to be encoded in settings.DEFAULT_CHARSET. That is what the test cases now assert.

HttpResponse charset handling now passes the entire test suite.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11110 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-25 17:19:53 +00:00
Chris Cahoon
eac54911f5 [soc2009/http-wsgi-improvements] Merged up to 11103 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11109 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-25 15:42:51 +00:00
Chris Cahoon
7acae8f4d8 [soc2009/http-wsgi-improvements] http.HttpResponse now initializes self._codec to None.
Changeset 11030 did not actually pass the regression test suite. This passes all except two tests, from test_client_regress. They expect old behavior (which is that their responses will be encoded in settings.DEFAULT_CHARSET). I am not yet sure if that is the correct expectation for the test to have, so I will do investigations into that.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 05:18:35 +00:00
Chris Cahoon
a86d5ddc77 [soc2009/http-wsgi-improvements] Moved common code from core.handlers.modpython and core.handlers.wsgi into core.handlers.base.process_request.
Passes regression tests.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 05:01:23 +00:00
Chris Cahoon
bab5ab348e [soc2009/http-wsgi-improvements] Added more tests for #10190, changed logic to pass them. http.charsets.determine_charset now takes the accept_charset header instead of the request.
Passes the test suite, including the extensive tests on HttpResponse's detection of Accept-Charset and finding the codec from content_type. However, it does not test that the codec encodes properly.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-17 20:42:15 +00:00
Chris Cahoon
1896d531cb [soc2009/http-wsgi-improvements] Code and tests in support of http.charsets.determine_charset.
This code determines the charset from a content-type or from the Accept-Charset request header.
The code is fairly well documented, but that will be improved once the code is in closer to a
final form. The codec that corresponds to the charset is also returned, but it is not currently
used by HttpResponse.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-16 16:42:46 +00:00
Chris Cahoon
c435676176 [soc2009/http-wsgi-improvements] Merged up to 11009 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-16 16:27:55 +00:00
Chris Cahoon
3d4f9ec1e6 Fixed #9253 -- Modified the method used to generate constraint names so that it is consistent regardless of machine word size.
NOTE: This change is backwards incompatible for some users.

If you are using a 32-bit platform, you will observe no differences as a
result of this change. However, users on 64-bit platforms may experience
some problems using the `reset` management command.

Prior to this change, 64-bit platforms would generate a 64-bit, 16 character
digest in the constraint name; for example:

ALTER TABLE `myapp_sometable` ADD CONSTRAINT `object_id_refs_id_5e8f10c132091d1e` FOREIGN KEY ...

Following this change, all platforms, regardless of word size, will
generate a 32-bit, 8 character digest in the constraint name; for example:

ALTER TABLE `myapp_sometable` ADD CONSTRAINT `object_id_refs_id_32091d1e` FOREIGN KEY ...

As a result of this change, you will not be able to use the `reset`
management command on any table created with 64-bit constraints. This
is because the the new generated name will not match the historically
generated name; as a result, the SQL constructed by the `reset` command
will be invalid.

If you need to reset an application that was created with 64-bit
constraints, you will need to manually drop the old constraint prior
to invoking `reset`.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:30:47 +00:00
Chris Cahoon
c81aa42bc7 Fixed #11194 -- Corrected loading of Proxy models from fixtures (and, by extension, save_base(raw=True) for Proxy models).
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:30:36 +00:00
Chris Cahoon
1015dad87d Fixed #10672 -- Altered save_base to ensure that proxy models send a post_save signal.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11001 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:30:22 +00:00
Chris Cahoon
6ff1f9c3ff Fixed #10785 -- Corrected a case for foreign key lookup where the related object is a custom primary key. Thanks to Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:30:05 +00:00
Chris Cahoon
17fb7b7d5a 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/branches/soc2009/http-wsgi-improvements@10999 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:29:52 +00:00
Chris Cahoon
8b5580286e Fixed #11271 -- Added a translation marker for the list_editable save button. Thanks to dc for the report.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@10998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:29:43 +00:00
Chris Cahoon
c85c268720 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/branches/soc2009/http-wsgi-improvements@10997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:29:32 +00:00
Chris Cahoon
87c1b6cc23 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/branches/soc2009/http-wsgi-improvements@10996 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:29:17 +00:00
Chris Cahoon
45e50c00d9 Fixed #10572 -- Corrected the operation of the defer() and only() clauses when used on inherited models.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@10995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:29:07 +00:00
Chris Cahoon
cb847aa224 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/branches/soc2009/http-wsgi-improvements@10994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:28:54 +00:00
Chris Cahoon
ae2dd58ab1 Fixed #11087 -- Fixed the Count annotation when used with GeoManager. Thanks to dgouldin for ticket and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@10993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:28:41 +00:00
Chris Cahoon
d8aa8ced20 Fixed #11200 -- Now use a set data structure for GoogleMap icons so that they aren't repeated in rendered JavaScript. Thanks to ludifan for ticket and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@10992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:28:25 +00:00
Chris Cahoon
5fa44cc855 Fixed a few Python 2.3 incompatibilities that were causing test failures.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@10991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:28:14 +00:00
Chris Cahoon
1acb38da06 Fixed #11216 and #11218 -- Corrected a few typos, thanks buriy.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@10990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:28:00 +00:00
Chris Cahoon
6713e1557d Added test for pickling of a model with an ImageField, refs #11103.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@10989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:27:48 +00:00
Chris Cahoon
35f8a3cc50 Updated Argentinian spanish translation, 100% complete as of r10858.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@10988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:27:38 +00:00
Chris Cahoon
f36391ecf5 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/branches/soc2009/http-wsgi-improvements@10987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-13 03:27:25 +00:00
Jacob Kaplan-Moss
2b9cefcdda Created "http-wsgi-improvements" branch for Chris Cahoon's SoC project.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@10855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-27 18:47:21 +00:00
Karen Tracey
7638651cc3 Fixed #11204 -- Corrected typo in the pluralize doc. Thanks martin and SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-27 16:26:56 +00:00
Karen Tracey
9b19fd7a76 Fixed #11209 -- Added a note to doc on connection.queries that the logged sql may not inlude parameter quoting.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-27 16:20:11 +00:00
Karen Tracey
bdf33b37da Fixed #11215 -- Replaced erroneous catch with except in testing doc.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-27 16:03:51 +00:00
Karen Tracey
5dc30c9fd2 Fixed #11205 -- Made the links to the str method description look the same as the links to the unicode method description in the tutorial part 1. Having one be fully qualified while the other was not was odd-looking.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-26 16:46:56 +00:00
Karen Tracey
5e20adcdf6 Fixed #11202 -- Removed mod_python information from FAQ, as it is no longer the recommended deployment option, in favor of more general pointers to the docs and wiki where deployment is discussed in depth.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10841 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-26 16:27:12 +00:00
Adrian Holovaty
a251e0ab7e Fixed #11070 -- Removed JING_PATH setting, which was no longer used. Thanks for the patch, seanl
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-26 05:32:52 +00:00
Adrian Holovaty
9848f888ba Made some small improvements to docs/topics/http/sessions.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-26 05:29:28 +00:00
Brian Rosner
5d9983d084 Fixed #8857 -- Corrected ref in modelforms documentation and added ref to file upload documentation in form documentation. Thanks Kyle Fox and prairiedogg.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10837 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-24 06:46:02 +00:00
Karen Tracey
e258961e4f Fixed #11188 -- Removed incorrect doc note about step being unsupported when slicing query sets.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-23 12:58:31 +00:00
Jacob Kaplan-Moss
077a94c550 Fixed #10867: make the makemessages command ignore files and only process directories. Thanks, diegobz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10833 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-20 20:05:14 +00:00
Jacob Kaplan-Moss
c935d7ffe3 Fixed #11134: signals recievers that disconnect during their processing no longer mess things up for other handlers. Thanks, Honza Kral.
While I was at it I also cleaned up the formatting of the docstrings a bit.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-20 16:13:55 +00:00
Jarek Zgoda
ca365b4113 Polish translation updated.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-20 11:03:10 +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
Russell Keith-Magee
2e24596001 Fixed #11116 -- Corrected the deletion of proxy objects. Thanks to Samuel Adam for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-19 13:42:38 +00:00
Russell Keith-Magee
b9b9ca334e Fixed #9308 -- Corrected the updated of nullable foreign key fields when deleting objects. Thanks to Bob Thomas for the fix, and markshep for the improvements on the test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-19 12:44:17 +00:00
Karen Tracey
ae95edf91d Fixed #11138 -- Corrected the description of behavior related to the max_num parameter for model formsets.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-18 16:00:29 +00:00
Karen Tracey
5a5842ccf2 Fixed #11137 -- Add missing base class in proxy model extra managers doc. Thanks ekarulf.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-18 15:36:18 +00:00
Karen Tracey
a6a0b29318 Fixed #10400: Added a note in the file uploads doc about the correct form type needed for file uploads to work. Thanks claudep and timo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-17 18:45:25 +00:00
Karen Tracey
b2d2aba77e Fixed #10817 -- Corrected some grammar in the forms doc. Thanks nickretallack@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-17 18:10:10 +00:00