Commit Graph

715 Commits

Author SHA1 Message Date
Jacob Kaplan-Moss 08d468db92 Fixed a messy test case (regressiontests/templates/loaders) that could cause future tests to fail by not cleaning up after itself.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7567 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-30 23:24:23 +00:00
Russell Keith-Magee d53e8f1285 Fixed #6430 -- Corrected the loading of templates from eggs, which was broken by the unicode merge. Thanks for the excellent report and patch, Juan Manuel Caicedo <juan.manuel.caicedo@gmail.com>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-29 13:11:23 +00:00
Russell Keith-Magee 5837a45bd9 Fixed #7173 -- Corrected the caching of objects in reverse OneToOne relationships. Thanks, Travis Terry.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7561 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-29 12:17:03 +00:00
Adrian Holovaty 14d6ee2dc9 Changed Query.get_columns() to quote the 'AS' column names in an extra_select situation, to match pre-queryset-refactor behavior. Added unit tests that verify this and provide an example
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 21:15:05 +00:00
Ian Kelly 13a6fd61c6 Renamed a field in the queries test schema that was preventing the tests from running in Oracle. I've opened #7109 to address the general problem. Refs #7109
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 17:31:08 +00:00
Malcolm Tredinnick ff6e529502 Added a test to demonstrate the remaining problem in #7095.
Only fails for MySQL (because they've made some interesting syntax choices).
Refs #7095.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 11:51:16 +00:00
Malcolm Tredinnick e07a457c00 Fixed #7096 -- The simplifications in [7461] weren't complete. They broke
multi-component exclude() calls. Fixed that.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 04:29:06 +00:00
Malcolm Tredinnick 356dfd5308 Fixed #7098 -- Old-style related-model order_by() syntax was being incorrectly
marked as erroneous. It's just more dangerous and risky, not forbidden. This
commit restores backwards compatibility there.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 02:27:19 +00:00
Adrian Holovaty 9c53847ef4 Added some tests to modeltests/many_to_one that demonstrate a post-queryset-refactor bug in dates(). Refs #7097
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 00:03:01 +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
Gary Wilson Jr 165772f37e Comment correction, `get_list` is now `filter`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-29 15:26:58 +00:00
Malcolm Tredinnick 23912ebbe2 Added a test for month selection under SQLite in case an old possible bug ever
resurfaces. Patch from Pilippe Raoult.

Fixed #659


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-24 14:19:12 +00:00
Malcolm Tredinnick 622a6447f9 Fixed #6868 -- Fixed test results for Windows systems. Thanks, Ned Batchelder.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-24 13:10:48 +00:00
Malcolm Tredinnick 675db84f23 Fixed #5917 -- More error robustness in date parsing in SelectDateWidget, plus
keep the original date selected on redisplay, even if it was bogus (e.g. 31
Feb). Patch from SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7337 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20 07:44:46 +00:00
Malcolm Tredinnick 463a03d7e3 Fixed #6825 -- Fixed the model_forms tests to also work on Windows by making
the filename detection a lot looser. Thanks, jerickso.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20 07:19:53 +00:00
Malcolm Tredinnick f8578d7f19 Forgot to commit a new file from [7328].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7332 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20 06:56:46 +00:00
Malcolm Tredinnick b3b8422363 Fixed #6445 -- Allow model instances to be used as a default for ForeignKeys
(via a callable). Also updates the documentation of the "default" attribute to
indicate a callable can be used. Thanks, Philipe Raoult.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20 06:56:23 +00:00
Malcolm Tredinnick 597f9d6105 Fixed #5982 -- Changed test client's URL processing to match core's (everything
gets run through urllib.unquote()). Patch from Leo Shklovskii and Russell
Keith-Magee.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7330 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20 06:50:54 +00:00
Malcolm Tredinnick 6417f5247b Merged the tests and documentation from #4720 to support the changes in [7295].
Thanks, Andy Gayton. Fixed #4720. Refs #5855.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20 06:35:53 +00:00
Jacob Kaplan-Moss 649cdf907d Fixed #4620: you can now easily add custom labels to ModelChoiceFields via subclassing. Thanks, PhiR.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7326 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-19 23:10:45 +00:00
Jacob Kaplan-Moss 4457ba002d Fixed #5894: added FilePathField to newforms. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-19 22:29:11 +00:00
Jacob Kaplan-Moss bc1f67a6de Replaced dict reprs in tests with explicit looks at each key. This should fix many spurious test failures on other VMs (first noticed on Jython).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7322 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-19 19:11:51 +00:00
Adrian Holovaty 6c2a78b266 Changed pagination tests to suppress the DeprecationWarning
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 21:53:39 +00:00
Adrian Holovaty d67208f5be Added a new and improved Paginator class, which allows you to pass a Page object to the template instead of 5 or 6 separate variables. ObjectPaginator still exists for backwards compatibility but issues a DeprecationWarning
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 21:13:48 +00:00
Malcolm Tredinnick ec0bbc15a8 Fixed #6230: Fixed the addition of id values to the select widgets in
SelectDateWidget. Thanks, Matt McClanahan.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 14:20:43 +00:00
Gary Wilson Jr d0032458a2 Fixed #6679 -- In `decorator_from_middleware`, don't unpack arguments when calling a middleware's
`process_view` method, thanks Gulopine.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-17 17:47:34 +00:00
Malcolm Tredinnick fac84c0bf4 Tweaked an i18n test that is a bit sensitive to Python versions. It returns
unexpected results on Python 2.4, so we ignore it there, too.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-17 16:03:46 +00:00
Malcolm Tredinnick 50ecd75379 Fixed #6492 -- Added bullet-proofing to isValidFloat validator. Thanks, Bastian Kleineidam.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7258 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-17 14:05:43 +00:00
Malcolm Tredinnick 30bdabb2b0 Fixed #6764 -- Added some error checking around cookie decoding. Thanks,
Michael Axiak.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-17 13:49:04 +00:00
Gary Wilson Jr 4487be66ef Fixed tests added in [7200] to not depend on unpredictable key order of dict, which was sometimes causing a test error.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-08 14:41:13 +00:00
Gary Wilson Jr d73c70d1ed Fixed #5595 -- Made `ModPythonRequest.__repr__` return a string instead of a unicode object. Fixes the printout of the request object in those server error e-mails I never get :)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-08 03:06:30 +00:00
Jacob Kaplan-Moss a9b4efc82b Re-enable substring lookups for IP address fields in Postgres using HOST() Thanks for the suggestion, Thomas Adamcik. Fixes #708.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-26 23:12:47 +00:00
Jacob Kaplan-Moss f7fbc289ad Reverted [7151] since it breaks exact IP lookups on PostgreSQL. Reopens #708
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-26 22:17:45 +00:00
Jacob Kaplan-Moss df5fef33c9 Beefed up support for "lazy" related objects. Now, in addition to ForeignKey("Model") you can also say ForeignKey("app.Model"). This means that cross-app recursive relations now work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-26 21:13:16 +00:00
Jacob Kaplan-Moss 297a12c2d1 Fixed a missing __init__.py from [7153]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-26 20:23:10 +00:00
Gary Wilson Jr 5ca0b9203b Fixed #5701 -- Fixed decorators to take the name, attributes, and docstring of the function they decorate by adding a modified version of the `functools.wraps` function from Python 2.5. `wraps` has been altered to work with Django's `curry` function and with Python 2.3, which doesn't allow assignment of a function's `__name__` attribute. This fixes severaly annoyances, such as the online documentation for template filters served by the admin app. This change is backwards incompatible if, for some reason, you were relying on the name of a Django decorator instead of the function it decorates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-25 06:02:35 +00:00
Malcolm Tredinnick 6482f1f887 Fixed #708 -- Fixed searching within IP fields on PostgreSQL.
Based on a patch from Matt McClanahan.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-23 09:15:35 +00:00
Malcolm Tredinnick 32402773f1 Fixed #3689, #5223 -- Fixed "1st of January" comparisons for SQLite without breaking the other backends.
Based on a patch from raminf and tests from Nebojsa Djordjevic.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7150 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-23 08:36:41 +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
Malcolm Tredinnick 54546f23f0 Fixed #6627 -- Made dict.clear() work for SortedDicts.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-21 21:27:44 +00:00
Malcolm Tredinnick 343fa35a2c Fixed #2936, #6500 -- Added a __hash__() method to Models (since we implement our own __eq__ method).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-19 01:59:34 +00:00
Malcolm Tredinnick e7b2ad8020 Fixed #6611 -- When copying a SortedDict, make a new copy of the keys list.
Thanks, Jeremy Dunck.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-18 23:08:51 +00:00
Malcolm Tredinnick b893eb4d7a Removed a portion of the test suite that was a pain on Python 2.3.
No actual useful functionality is lost by this; it's just a 'keep the Buildbot
happy" thing.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-15 15:17:48 +00:00
Malcolm Tredinnick d9a3c1b9fc Made a bunch of tiny documentation formatting and typo fixes.
Thanks, quicklizard, adamv, Gary Wilson, superjudge and David Pretty.

Fixed #6554, #6573 ,#6592, #6595, #6608.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-15 11:38:53 +00:00
Malcolm Tredinnick 1159791cd5 Modified [7112] to make things behave more in line with Python subclassing when subclassing ModelForms.
Meta can now be subclassed and changes on the child model affect the fields
list. Also removed a block of error checking, since it's harder to mess up in
unexpected ways now (e.g. you can't change the model and get the entirely wrong
fields list), so it was a level of overkill.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7115 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-14 17:38:05 +00:00
Malcolm Tredinnick 37962ecea7 Fixed #6337. Refs #3632 -- Fixed ModelForms subclassing, to the extent that it can be made to work.
This ended up being an almost complete rewrite of ModelForms.__new__, but
should be backwards compatible (although the text of one error message has
changed, which is only user visible and only if you pass in invalid code).

Documentation updated, also.

This started out as a patch from semenov (many thanks!), but by the time all
the problems were hammered out, little of the original was left. Still, it was
a good starting point.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-14 12:56:49 +00:00
Malcolm Tredinnick 0a3c8f03e0 Fixed #6409 -- Unbreak compound locale name parsing (e.g. zh-cn).
This was inadvertently broken back in [6608]. Slightly backwards-incompatible:
people specifying "es_AR" in their LANGUAGES list will need to change that to
"es-ar". Thanks, simonb and Ramiro Morales for making the effort to fix this.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-06 01:04:30 +00:00
Malcolm Tredinnick 0c4ea9b922 Fixed #6279, #6514 -- Fixed some HTML escaping problems in the urlize filter.
Based on a patch from SmileyChris with some test additions from Rob Hudson.
Thanks, both.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7079 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 08:54:26 +00:00
Malcolm Tredinnick 2542b94fb2 Fixed #6465 -- Tweaked MergeDict.getlist() to work with Django's MultiValueDict class. Thanks, Matt McClanahan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7062 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 02:02:41 +00:00
Malcolm Tredinnick d18a114f86 Fixed #6326 -- Made the test for translations of filter arguments test something that has a chance of failure. Thanks akaihola.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 01:49:55 +00:00