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