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
Gary Wilson Jr
cc7c6f3e46
Fixed #5422 -- Added a `raw` parameter to model `pre_save` and `post_save` signals, based on patch from `graham.carlyle@maplecroft.net`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7054 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-01 17:32:29 +00:00
Jacob Kaplan-Moss
755278253e
Fixed #6302 for ImageFields.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-18 15:53:19 +00:00
Joseph Kocherhans
fd20365b27
Fixed #6302 . FileField no longer requires a value if one already exists. Thanks Brian Rosner and Øyvind Saltvik.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-17 18:03:21 +00:00
Gary Wilson Jr
4ee22e480e
Fixed #6365 -- Added `blank=True` to parent attribute of `m2o_recursive` model example, thanks dgrant.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-13 02:19:06 +00:00
Malcolm Tredinnick
70fe1ef262
Fixed Python 2.3 problem I introduced all the way back in [6852]. :-(
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-06 07:23:21 +00:00
Malcolm Tredinnick
a7da12d320
Fixed #5567 -- Added a "last" filter. Based on a patch from darkpixel.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-06 03:53:33 +00:00
Adrian Holovaty
3d52ce730f
Reverted 'regroup' template tag changes from [6956], as they caused bug #6271 , which affects one of my sites. I don't have time to inspect the #6271 patch, so I'm reverting this change in the interim, to fix the bug immediately.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6996 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-05 00:03:12 +00:00
Ian Kelly
6929c0d4d1
Fixed #6254 : Made fetchone() in the oracle backend correctly convert
...
strings to unicode objects.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-04 22:51:22 +00:00
Gary Wilson Jr
d6d1188ed0
Middleware regression test fixes:
...
* Added a models.py file so the tests run.
* Reset `settings.DEBUG` to `False` at the end of the `test_append_slash_no_redirect_on_POST_in_DEBUG` test so it doesn't bleed over to other tests.
* Removed unused import.
* Minor docstring fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-03 02:14:29 +00:00
Adrian Holovaty
f6336737a0
Fixed #6291 -- Fixed error in CASocialInsuranceNumberField documentation and error message. Thanks, jeff+django@ivany.org and arien
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-02 05:23:21 +00:00
Adrian Holovaty
293f0f2360
Fixed #6295 -- Made the {% for %} tag a bit more efficient by creating a single context dictionary rather than recreating it each time through the loop. Thanks, Ned Batchelder
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-02 05:01:03 +00:00
Gary Wilson Jr
d1b5a0bde5
Removed some reverse string craziness from the regroup template tag argument checking and added a few syntax tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-19 06:11:55 +00:00
Malcolm Tredinnick
a35ca605d6
Fixed #5670 -- Changed the validation of the UK postcode widget to allow for easier input. Normalisation still returns the same things as previously. Patch from scott@staplefish.com.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-19 04:43:47 +00:00
Malcolm Tredinnick
367867845f
Fixed #6239 -- Fixed an auto-escaping problem with urlizetrunc. Thanks, SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-19 04:20:02 +00:00
Malcolm Tredinnick
b279b75c87
Fixed #5596 -- Changed the static view for the development server so that Django doesn't crash if somebody tries to serve a 200MB file. Patch from eibaan.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 11:46:48 +00:00
Malcolm Tredinnick
931764ddb5
Fixed #6200 -- Made the core tests independent of the value of LOGIN_URL, since they are sensitive to its setting. Thanks, Jason Yan.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 10:31:20 +00:00
Malcolm Tredinnick
4a25cf5d95
Fixed a Python 2.3 problem from [6927].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 08:50:19 +00:00
Malcolm Tredinnick
03f1eb23e5
Fixed #5956 -- Added a better error description for non-ASCII HTTP headers. Patch from jvloothuis.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 08:05:51 +00:00
Malcolm Tredinnick
1fcb4e4bcd
Fixed #5871 -- Factored out the validation errors in localflavor form fields. Brings them into line with the standard newforms fields. Patch from Jan Rademaker.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 08:05:27 +00:00
Joseph Kocherhans
4c59ca6020
Changed ModelForms to allow inheritance as long as their model attributes are the same.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-13 03:14:31 +00:00
Joseph Kocherhans
e415eff0ea
Fixed #6162 . ModelForm's __init__ signature now matches Form's. This is a backwards incompatbile change. Based largely on a patch by ubernostrum.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-13 02:48:04 +00:00
Ian Kelly
ed5eca598e
Fixed ORA-01461 error when trying to store more than 4000 bytes in a TextField under Oracle
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-11 02:22:40 +00:00
Malcolm Tredinnick
5ed205bc8a
Fixed #3906 -- Fixed the reverse_m2m_name for a generic relation. Refs #2749 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-09 07:12:07 +00:00
Jacob Kaplan-Moss
b65fce6595
Fixed #4131 : added an "escapejs" filter for use in JavaScript strings, and updated the documentation on addslashes to point to the new ticket. Featuring contributions from Ned Batchelder, Jeremy Dunck, and Andy Durdin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6892 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 21:08:29 +00:00
Jacob Kaplan-Moss
76b73ce725
Fixed #5268 : the YAML serializer now uses yaml.safe_dump() instead the plain yaml.dump(); this makes YAML dumps more portable, and also removes the crufty '!!python/unicode' business. Thanks, poelzi.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 20:31:34 +00:00
Jacob Kaplan-Moss
acfff050ec
Fixed #6099 : the filebased cache backend now uses md5 hashes of keys instead of sanitized filenames. For good measure, keys are partitioned into subdirectories using the first few bits of the hash. Thanks, sherbang.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 18:03:56 +00:00
Jacob Kaplan-Moss
91ca6f2e7e
Fixed #6122 : Fixed tests broken by [6872]. Thanks, Matt.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 17:14:32 +00:00
Malcolm Tredinnick
67373009e0
Fixed #4563 -- Context.pop/push/update return the top-level dictionary (the new
...
one for push() and update(), the one removed for pop()). Based on a patch from
Brian Harring.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 23:57:22 +00:00
Malcolm Tredinnick
1f629bff99
Fixed #3228 -- Added new APPEND_SLASH handling behaviour in the common middleware. Makes customisation a bit easier. Thanks, Mihai Preda and Andy Gayton.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 23:25:55 +00:00
Malcolm Tredinnick
2e62b84acc
Fixed #6071 -- Fixed another infinite recursion problem in SafeString and
...
SafeUnicode. Thanks, Trey Long.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 20:17:10 +00:00
Malcolm Tredinnick
51dc4ecf94
Fixed #6042 -- ModelForms implementation from Joseph Kocherhans. Still might
...
need a little tweaking as people start to use it, but this is mostly complete.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 19:29:54 +00:00
Malcolm Tredinnick
61947f0635
Fixed #3961 -- Added South African localflavor. Thanks, Russell Cloran.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 18:43:01 +00:00
Malcolm Tredinnick
805c364fcf
Fixed #3511 -- Changed QuerySet.get() to return a MultipleObjectsReturned exception, rather than an assertion error. Thanks, Gary Wilson and cheeming.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 18:21:07 +00:00
Malcolm Tredinnick
5e5768ae83
Fixed #3323 -- More robust error handling for related objetcs. Thanks, Greg
...
Kopka and shaleh.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 18:10:07 +00:00
Gary Wilson Jr
892b04bf21
Fixed a use of `maxlength`, refs #2101 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 01:45:59 +00:00
Gary Wilson Jr
075cfa72ba
Removed unused import.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 01:44:58 +00:00
Malcolm Tredinnick
f6a3b499b8
Fixed #6086 -- Deprecate the "simple" cache backend in favour of "locmem".
...
Thanks, Paul Bissex.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 00:35:14 +00:00
Malcolm Tredinnick
348f2cbfc1
Fixed #5996 -- Add a pyscopg2 convertor for SafeUnicode -> unicode. Thanks, remco@diji.biz
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 22:26:24 +00:00
Malcolm Tredinnick
b3db18817a
Fixed #5979 -- Always use SITE_ID=1 when running Django's core tests. This
...
makes things much easier. Thanks, George Vilches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 21:58:51 +00:00
Malcolm Tredinnick
a72324bf7f
Fixed #6068 -- Updated docstrings in model tests to make the documentation
...
examples correct. Thanks Wang Chun.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 21:18:45 +00:00
Malcolm Tredinnick
8de4ed9c8c
Fixed #6057 -- Mark rendered template output as safe for auto-escaping purposes.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-30 15:32:01 +00:00
Malcolm Tredinnick
5d1d054e15
Fixed #6030 -- More robust error handling for the "float" filter. Thanks,
...
SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 20:10:00 +00:00
Malcolm Tredinnick
caa0523cb8
Fixed #6050 -- Handled edge-case of duplicate keys being passed when
...
initialising SortedDict. Patch from Collin Grady and SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 20:09:54 +00:00
Malcolm Tredinnick
f3c15225fc
Fixed #6023 -- Fixed daylight savings determination for years beyond 2038 on
...
32-bit systems (modulo the fact that the system timezone libraries might not be
accurate that far out; at least we don't crash now). Thanks, SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 19:39:46 +00:00
Malcolm Tredinnick
260f9c5112
Fixed #5989 -- Fixed a problem with values being incorrectly reused by
...
reference in field subclassing. Thanks, flupke.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 19:30:49 +00:00
Malcolm Tredinnick
29892d02fa
Fixed #6014 -- More robust error handling when validating decimal fields.
...
Thanks, pigletto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 19:30:38 +00:00
Malcolm Tredinnick
7a166f1a1c
Fixed #5959 -- Fixed handling of False values in hidden boolean fields. Thanks,
...
SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6745 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 19:22:03 +00:00
Malcolm Tredinnick
4cbc8c62cf
Fixed #5939 -- Added normalization for New Brunswick in the Canadian provinces.
...
Thanks, rajesh.dhawan@gmail.com .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 18:15:46 +00:00
Malcolm Tredinnick
d0f5a58fbd
Fixed #4653 -- Improved the logic to decide when to include (and select as
...
initial value) the blank choice for a model field with choices. Thanks to
Ilya Semenov for persisting with this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 16:32:18 +00:00
Malcolm Tredinnick
b6002d4af6
Fixed #1291 -- Fixed a potential infinite loop for some URL constructions in
...
the development server. Thanks, Graham Carlyle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 15:47:47 +00:00
Malcolm Tredinnick
3c272792d6
Added tests and a small optimisation for [6721]. Thanks SmileyChris. Fixed #6049
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 01:44:30 +00:00
Malcolm Tredinnick
9130765ff9
Fixed #5890 -- fixed the far edge-case of allowing constant strings inside
...
template template markers: we now treat embedded, escaped double quotes
consistently with constant string arguments to filters. Patch from Dmitri
Fedortchenko.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6724 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-28 21:04:05 +00:00
Malcolm Tredinnick
1c87a7bb58
Fixed #5730 : Conditionally escape widget contents in newforms to avoid
...
inadvertent double-escaping. This still isn't perfect behaviour (since it's
unaware of the current context's auto-escaping setting), but that's a larger
problem that needs fixing and this change at least makes the existing
behaviour consistent. Patch from SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-28 20:19:54 +00:00
Gary Wilson Jr
f110da91db
Fixed #5993 -- Made `RadioSelect` easier to subclass by giving it a default `renderer` as a class attribute.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-26 02:39:48 +00:00
Gary Wilson Jr
5903b0bdcd
Added a few more tests for `MultiValueDict`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 18:16:40 +00:00
Malcolm Tredinnick
2e9e36e297
Fixed #5983 -- Made iriencode filter respect safe strings. Patch from
...
SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-20 01:37:57 +00:00
Gary Wilson Jr
6522e0697a
Fixed #5932 -- Use `self.pages` and not `self._pages` in `_get_page_range` so that an exception is not raised if `self.page_range` is accessed before `self.pages`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6702 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-19 06:10:23 +00:00
Gary Wilson Jr
34cc21983c
Removed `vary_delim_re` in `django/utils/cache.py` in favor of existing `cc_delim_re` since the latter is more correct in parsing the header (allows whitespace before and after comma separators instead of just after). As a bonus, tests added for `patch_vary_headers()`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-19 03:12:19 +00:00
Gary Wilson Jr
b2b6fc8e3c
Fixed #5975 -- Gave `ModelChoiceField` and `ModelMultipleChoiceField` ability to specify custom error messages.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6694 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-18 20:25:23 +00:00
Malcolm Tredinnick
5f8cfe99f3
Fixed #5969 -- Corrected a problem introduced in [6682].
...
*sigh* As usual, the one case I forget to test turned out to be broken.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-18 03:36:03 +00:00
Malcolm Tredinnick
4bd75e8712
Fixed a couple of chained filter tests that weren't demonstrating what they
...
claimed (since the "cut" filter's behaviour had changed since I originally
wrote those tests).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 12:18:09 +00:00
Malcolm Tredinnick
4585b4d6c2
Fixed some missed auto-escaping and URL quoting cases in the urlize filter.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 12:12:40 +00:00
Malcolm Tredinnick
adcec0885d
Fixed a few problems with variable resolving inside of blocktrans tags. A couple of these were exposed by the auto-escaping changes, but I suspect the other one has been hiding in plain sight for a while.
...
Fixed #5952 , #5953
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 12:12:18 +00:00
Malcolm Tredinnick
64c0bf8677
Translating safe strings should return a safe result.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 12:11:54 +00:00
Malcolm Tredinnick
0928fa5566
Fixed #5945 -- Treat string literals in template filter arguments as safe
...
strings for auto-escaping purposes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6680 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 12:11:26 +00:00
Malcolm Tredinnick
0b0ef3f0c5
Fixed #4713 -- Fixed handling of _() in template tag arguments. Based on
...
patched from Indy and SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 04:04:12 +00:00
Malcolm Tredinnick
bdb0b903c2
Content coming via {{ block.super }} is always going to be correctly escaped
...
already. We mark it as safe so that template authors don't need to.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14 21:07:27 +00:00
Malcolm Tredinnick
356662cf74
Implemented auto-escaping of variable output in templates. Fully controllable by template authors and it's possible to write filters and templates that simulataneously work in both auto-escaped and non-auto-escaped environments if you need to. Fixed #2359
...
See documentation in templates.txt and templates_python.txt for how everything
works.
Backwards incompatible if you're inserting raw HTML output via template variables.
Based on an original design from Simon Willison and with debugging help from Michael Radziej.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14 12:58:53 +00:00
Gary Wilson Jr
babfe78494
Fixed #4787 , #5913 -- Updating the queryset on a `ModelChoiceField` or `ModelMultipleChoiceField` now updates its widget's choices. The clean methods for `ModelChoiceField` and `ModelMultipleChoiceField` were changed to only allow choices in the specified queryset (instead of allowing all choices returned by the queryset model's default manager).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-13 14:36:29 +00:00
Malcolm Tredinnick
3ee3d6b5f3
Fixed #5898 -- Changed a few response processing paths to make things harder to get wrong and easier to get right. Previous behaviour wasn't buggy, but it was harder to use than necessary.
...
We now have automatic HEAD processing always (previously required ConditionalGetMiddleware), middleware benefits from the Location header rewrite, so they can use relative URLs as well, and responses with response codes 1xx, 204 or 304 will always have their content removed, in accordance with the HTTP spec (so it's much harder to indavertently deliver invalid responses).
Based on a patch and diagnosis from regexbot@gmail.com .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 03:55:44 +00:00
Malcolm Tredinnick
30848dfe34
When using assertRedirect(), allow the caller to specify relative URLs and
...
automatically fill in the hostname and scheme (host can be passed in, if
different from the default).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 03:54:21 +00:00
Gary Wilson Jr
1eecc5a47e
Corrected a couple comments in `model_forms` tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-09 19:35:56 +00:00
Luke Plant
8eeb9feab0
Fixed #4376 -- login_required now works with bound methods. Thanks, Steven Bethard.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6658 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-07 22:45:07 +00:00
Malcolm Tredinnick
ea100b607a
Added the small changes necessary to make creating custom model fields easier.
...
Also includes some tests for this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-05 13:59:42 +00:00
Gary Wilson Jr
a5eb61cd9f
Added tests for `floatformat` template filter for number with non-zero decimal place digit and ending in zeros.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 02:32:02 +00:00
Malcolm Tredinnick
77a846bab0
Fixed a Python 2.3 problem.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 02:08:15 +00:00
Gary Wilson Jr
8c442f21dc
Fixed #5816 -- Fixed a regression from [6333] that generates incorrect cookie "expires" dates when using a locale other than English. Introduced `http_date` and `cookie_date` utility functions. Thanks for the report Michael Lemaire. Thanks for the patch Karen Tracey and `SmileyChris`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-31 03:59:40 +00:00
Gary Wilson Jr
26ea06b0ab
Fixed #3457 -- Allow overridding of error messages for newforms Fields.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-28 05:40:26 +00:00
Malcolm Tredinnick
1580630fbd
Removed an "XFAIL" marker that was accidentally hanging around since the
...
unicode branch days.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 06:23:19 +00:00
Malcolm Tredinnick
91556cf22e
Fixed an invalid URL specification.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6618 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 06:23:05 +00:00
Jacob Kaplan-Moss
a14256aade
Committed missing file from [6608].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-26 20:08:56 +00:00
Jacob Kaplan-Moss
842a771e05
i18n security fix. Details will be posted shortly to the Django mailing lists and the official weblog.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-26 19:52:42 +00:00
Matt Boersma
2c22f08657
Changed field to "def_date" from "date" in new tests from [6568] so we can run the test suite against Oracle again. Refs #4140 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-22 22:04:00 +00:00
Malcolm Tredinnick
003b3c1a17
Fixed #5794 -- Be more robust when rendering a DateTimeInput widget. Thanks,
...
MikeH.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6594 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-22 13:13:12 +00:00
Malcolm Tredinnick
dbd1cb9083
Fixed #5183 -- Added __deepcopy__, pop() and popitem() to SortedDict. Based on
...
a patch from David Blewett.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6593 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-22 00:52:54 +00:00
Malcolm Tredinnick
8e87587e89
Fixed #3265 -- Made it a validation error to have field names with trailing
...
underscores. Allowing these would enable peopleto write ambiguous queryset
filters (plus makes parsing filters much harder).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 21:53:18 +00:00
Malcolm Tredinnick
3ec6568e64
Modified the test harness to respect the LANGUAGE_CODE setting. Also changed
...
Django's own test runner to always use 'en' for LANGUAGE_CODE when testing
core. Fixed #4709
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 17:26:32 +00:00
Malcolm Tredinnick
7ca708140a
Fixed #2920 -- Removed _() from builtins.
...
This is backwards incompatible, but easy to work around.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6582 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 17:14:25 +00:00
Malcolm Tredinnick
6fbf653aa5
Fixed #1065 -- Added a "cache" template tag. Thanks, Ian Maurer and, particularly, Nick Lane.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 15:48:40 +00:00
Malcolm Tredinnick
1671fc48ab
Changed the default form presentation of datetime values to not include the
...
fractional second values (they usually aren't going to be needed). Based on
patches from yi.codeplayer@gmail.com , andrews and Wiliam Alves de Souza. Fixed #4428 , #4487
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 14:50:47 +00:00
Malcolm Tredinnick
714c09b8bd
Fixed #4831 -- Added an "add" cache key method, for parity with memcached's
...
API. This works for all cache backends. Patch from Matt McClanahan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 15:16:34 +00:00
Malcolm Tredinnick
b678601df3
Fixed #4123 -- Changed the firstof template tag to correctly handle a literal
...
string as its last argument. Thanks, Wesley Fok and Matt Boersma.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 15:01:31 +00:00
Malcolm Tredinnick
18e1f56a41
Fixed #5475 -- Added the Luhn check algorithm to django.utils.checksums so that
...
localflavors don't have to reimplement it each time. Thanks, __hawkeye__.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 13:40:20 +00:00
Malcolm Tredinnick
f20b254ccc
Fixed #899 -- Use model field default values as formfield initial values in
...
form_for_model(). Patch from David Danier and PhiR. Thanks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 13:01:40 +00:00
Malcolm Tredinnick
e38d54e19a
Changed newforms.CheckboxInput widget to return False as its value when not
...
include in the form (since HTML form submission doesn't send unselected check
boxes). Patch from SmileyChris. Refs #5104 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 12:21:07 +00:00
Malcolm Tredinnick
8db11840d3
Fixed #5200 -- Added some more functionality to the Polish localflavor. Thanks,
...
Slawek Mikula.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 09:24:19 +00:00
Malcolm Tredinnick
aac5555f2f
Fixed #4036 -- Added Spanish localflavor. Thanks, ricardojbarrios@gmail.com and
...
oggie_rob.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 09:16:54 +00:00
Malcolm Tredinnick
bece031772
Fixed #5734 -- Fixed an omission where we weren't passing the "safe" argument
...
upstream in django.utils.http.urlquote(). Thanks, Thomas Güttler.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 08:38:59 +00:00
Malcolm Tredinnick
cb38521487
Changed the auth_backend tests in a cosmteic fashion so that they pass under Python 2.3 as well.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 08:15:42 +00:00
Gary Wilson Jr
78d557bf02
Fixed #5744 -- Allowed SortedDict contructor to be passed a list of tuples to match the interface of dict, thanks Thomas Güttler.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14 04:17:02 +00:00
Malcolm Tredinnick
185848a526
Fixed #5641 -- Handle lazy translations correctly when used as default arguments. Thanks, permon.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-04 01:55:51 +00:00
Malcolm Tredinnick
fa546d797e
Fixed #4796 . Fixed a problem when using i18n support for the first time -- in
...
particular when string_concat() was the first call made. Thanks, Andy Durdin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-03 01:57:02 +00:00
Jacob Kaplan-Moss
960c1263b6
Fixed #5559 : instances sent via post-save signals no longer have pks of None. Thanks, Joseph Kocherhans.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-24 18:27:42 +00:00
Russell Keith-Magee
2d1d7e453c
Fixed generic view test which was failing on Postgres and MySQL.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6407 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-22 15:14:41 +00:00
Russell Keith-Magee
f2101abacf
Fixed #5553 -- Fixed a serialization problem with datetime and time objects. Thanks to pigletto for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6406 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-22 13:21:54 +00:00
Russell Keith-Magee
302eeaf190
Fixed #5516 -- Added the ability for applications to define their own management commands. Pieces of this patch taken from a contribution by Todd O'Bryan. Thanks Todd.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-21 16:19:20 +00:00
Jacob Kaplan-Moss
484189ff9c
Fixed httpwrappers tests broken by [6385].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-20 15:51:19 +00:00
Jacob Kaplan-Moss
7768fe3505
Removed empty tests/regressiontests/forms/localflavor.py file left over after [6379]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6380 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-20 00:24:42 +00:00
Jacob Kaplan-Moss
35fa1f4d8e
Fixed #5546 : split form unit tests into manageable chunks. This isn't a perfect fix since the chunks aren't yet autodiscovered, but that shouldn't prevent checking this in. Thanks, Leo Soto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-19 23:40:47 +00:00
Jacob Kaplan-Moss
980fa8b827
Fixed #231 : all fields that should take max_length now do. Thanks, Don Spaulding.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-19 23:33:57 +00:00
Jacob Kaplan-Moss
f857e37776
Fixed $5457 - the auth system now delegates permission checking to auth backend(s). As an added bonus, the auth backends now have some unit tests! Thanks, Florian Apolloner.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-19 16:50:30 +00:00
Russell Keith-Magee
466871ec1b
Fixed #5506 -- Added some basic tests for date-based generic views. Thanks to robh for the original patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6374 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-19 13:26:56 +00:00
Russell Keith-Magee
1571e9c32b
Fixed #5496 -- Added test cases for some of the built-in Django views. Thanks to Manuel Saelices <msaelices@yaco.es> for the original patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-17 14:48:33 +00:00
Gary Wilson Jr
66203fc9ee
Fixed #2675 -- Changed the `timeuntil` and `timesince` template filters to display "0 minutes" when passed a past or future date respectively instead of "-1 years, 12 months". Thanks to nickefford for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-17 04:50:12 +00:00
Malcolm Tredinnick
c012b8964e
Fixed #4067 -- Fixed validation of IPAddressFields in newforms. Thanks to neils and the team in the Copenhagen sprint group.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 11:38:32 +00:00
Malcolm Tredinnick
e988aa3989
Fixed a typo. I think I should get full marks for getting all the letters right, but some people insist they should be in the right order, too.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 10:49:27 +00:00
Malcolm Tredinnick
7a6e9f7633
Rewrote the backends test to be more portable. Was previously failing on MySQL.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 10:04:26 +00:00
Malcolm Tredinnick
14754fa6d4
Removed the test portion that relies on transactions when the backend is mysql or mysql_old (it's still in place for all other backends).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 10:04:03 +00:00
Malcolm Tredinnick
748e55b1da
Fixed #4975 -- Allow the default label suffix character to be configured. Thanks, Vincent Foley.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 04:38:20 +00:00
Malcolm Tredinnick
e2409750f8
Fixed #3703 -- Added pk property to models. Thanks, Collin Grady and jeromie@gmail.com.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6346 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 01:57:25 +00:00
Malcolm Tredinnick
885db3cb79
Fixed #5355 -- Fixed data cleaning for DecimalField.
...
In passing, fixed a problem with cleaning in IntegerField.
Includes tests from PhiR.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6282 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 11:45:19 +00:00
Malcolm Tredinnick
39814eeb54
Fixed #5487 -- Added deepcopying ability to lazy() objects, along with a test to demonstrate why the previous code failed. Debugging and patch from John Buchanan.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 10:57:03 +00:00
Malcolm Tredinnick
f0cd172cd0
Fixed #5387 -- Added is_multipart method to forms. Original patch from Petr Marhhoun. Tests and documentation from Murkt.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 10:12:05 +00:00
Malcolm Tredinnick
1baae32e16
Fixed #4879 -- Added 'created' arg to post_save signal. This is True is a new object is created. Patch from George Vilches.
...
Fully backwards compatible, because signal receivers do not have to be able to accept all the arguments (thankyou, robust_apply()).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 09:14:51 +00:00
Russell Keith-Magee
314536190b
Fixed #4714 -- Modified serializers to handle None primary keys correctly. This slightly changes the output format for primary keys on JSON and YAML serializers (PKs will be output as 1, rather than "1". However, fixtures in the old format will still load ok. Thanks for the patch, pigletto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 05:32:29 +00:00
Russell Keith-Magee
cf3c94b26d
Fixed #4415 -- Added formfield method to PositiveIntegerField, so that those fields get validated correctly. Thanks, Oggie Rob.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6252 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 02:37:07 +00:00
Ian Kelly
c74ebab686
Added explicit order_by filters to some model_forms tests that were failing in Oracle due to returning results in the wrong order.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 00:19:22 +00:00
Ian Kelly
ad821b6459
Made the fixtures_regress test case be aware of Oracle's empty string
...
limitations.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 00:08:08 +00:00
Matt Boersma
6c16d84a0b
Fixed test case that failed on Oracle because it assumed an ordering for
...
objects.all().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 23:09:05 +00:00
Jacob Kaplan-Moss
5af2af3e33
Fixed the test in [6218] which was invalid for psycopg2 and friends -- executemany() shouldn't accept None, just empty lists.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 22:54:58 +00:00
Ian Kelly
5a5d8a90b5
Added test cases for [6218].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 21:38:45 +00:00
Jacob Kaplan-Moss
525af7d580
Fixed #4542 : added a generic localflavor DateField. Thanks, Nick Lane.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 19:28:26 +00:00
Adrian Holovaty
55d6aebfec
Fixed #5394 -- REDIRECT_FIELD_NAME is now configurable. Thanks, Petr Marhoun, DavidReynolds and effbot
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 19:25:37 +00:00
Jacob Kaplan-Moss
7e4da4e66d
Fixed #3988 : added a localflavor for our friends to the north (i.e. Canada). THanks, Tyler Tarabula.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 19:02:05 +00:00
Jacob Kaplan-Moss
eea935a7f4
Fixed #5448 : you can now use unicode characters in primary keys. Thanks, pigletto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 18:36:04 +00:00
Ian Kelly
93f60163e8
Fixed #5218 : Made Oracle create autoinc triggers using the correct name
...
of the AutoField column rather than always assume "ID".
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 18:12:36 +00:00
Malcolm Tredinnick
b7df720839
Fixed #5453 -- Fixed TEST_DATABASE_NAME handling to match documentation. Thanks, Matt Croydon.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 12:48:10 +00:00
Malcolm Tredinnick
ea3e89cb1d
Fixed a bunch of Python 2.3 issues. Two tests still fail, but this fixes the bulk of things.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 09:55:17 +00:00
Malcolm Tredinnick
5188a18dbe
Fixed #4964 -- Added Brazilian state field to localflavors. Thanks, William Alves de Souza.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 07:19:38 +00:00
Russell Keith-Magee
20ecbbd9e7
Fiex #5331 -- Modified newforms URLField to prepend http:// if no protocol is specified by the user. Thanks, SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 07:02:55 +00:00
Malcolm Tredinnick
eabb57f6f0
Fixed tests to match new HTTP redirect behaviour. We always redirect to absolute URLs now.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 06:05:54 +00:00
Malcolm Tredinnick
e70d7e6064
Fixed #987 -- Convert relative URI portions into absolute URIs in HTTP Location headers. Based on a patch from SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6164 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 05:28:00 +00:00
Malcolm Tredinnick
70e5dce365
Fixed #3489 -- Added proper deepcopying to form fields so that widget instances get copied as well. Patch from Jonathan Buchanan and insin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 03:29:39 +00:00
Russell Keith-Magee
09145d2e5f
Fixed #208 -- Modernized the syntax of the cycle tag to allow for spaces and variables in cycle values. Thanks to SmileyChris and Chris McAvoy for their work on this.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 02:49:21 +00:00
Russell Keith-Magee
a2ce7669d9
Fixed #3421 -- Added IP and localhost validation to newforms URLField. Thanks, SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 02:11:24 +00:00
Gary Wilson Jr
8b0eaba0ee
Moved `flatatt` function tests to the util test module.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 02:05:45 +00:00
Gary Wilson Jr
0b1f4e3c7b
Refs #5370 -- Added tests for ValidationError messages.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6150 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 02:01:11 +00:00
Russell Keith-Magee
87e77ffca0
Fixed #1795 -- Added page_range to paginators in generic list views. Thanks to polarcowz@gmail.com and Marc Fargas <telenieko@telenieko.com> for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6146 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 01:01:02 +00:00
Malcolm Tredinnick
cb9db44938
Fixed #5431 -- Added Argentinean localflavor. Thanks, Ramiro Morales.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 00:58:57 +00:00
Malcolm Tredinnick
ce249d4366
Fixed #4752 -- Make default ErrorList customisable in newforms display. Based on a patch from michal@logix.cz and SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6142 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13 23:09:40 +00:00
Malcolm Tredinnick
a9fd677cb3
Fixed #5403 -- Added Dutch localflavor. Thanks, Jan Rademaker.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13 22:16:59 +00:00
Gary Wilson Jr
aacb0cf055
Removed duplicate form tests added in the [changeset:5609 unicode merge].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6090 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-11 04:21:32 +00:00
Gary Wilson Jr
7e57576ff7
Fixed #5232 -- Fixed the validation of `DecimalField` so that the negative sign is not counted as a digit. Thanks, Andrew Durdin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-08 19:24:46 +00:00
Gary Wilson Jr
41b3a45fc5
Fixed #3557 -- Made `SlugField` inherit from `CharField` so that its `max_length` is properly set. Removed `get_manipulator_field_objs` method since it's already provided by `CharField`. Thanks, Russell Cloran.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-08 05:09:39 +00:00
Gary Wilson Jr
4e476b44af
Removed trailing whitespace.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-04 00:54:40 +00:00
Gary Wilson Jr
2292ebb47f
Removed import that snuck into [6044].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-04 00:53:59 +00:00
Gary Wilson Jr
53372fcb07
Cleaned up some imports.
...
Fixed long lines.
Changed some docstrings to use "action words".
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-04 00:50:06 +00:00
Gary Wilson Jr
1da7b5cde7
Added test for unknown non-field error.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6043 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-04 00:48:19 +00:00