Commit Graph

774 Commits

Author SHA1 Message Date
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
Russell Keith-Magee d1d4d018bf Fixed #5330 -- Added a fixture file that was missing from [6039].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-03 23:41:24 +00:00
Gary Wilson Jr bce7de9647 Removed some duplication in the Django `TestCase` methods by introducing a `to_list` function for putting a value into a list if it's not already one.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-03 23:14:51 +00:00
Russell Keith-Magee 3bf4ef0c77 Fixed #4988 -- In the test client, Added tracking of the client and request that caused a response so that the assertRedirects check can use the correct client when following a redirect. Well spotted, alex@gc-web.de.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-03 11:21:40 +00:00
Russell Keith-Magee 5ad08583e1 Fixed #4968 -- Added assertRedirects handling for paths with GET data. Thanks for the patch, Ivan Sagalaev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-31 11:37:28 +00:00
Gary Wilson Jr 1a1a58c9f8 Fixed #3184 -- Changed the `unordered_list` template filter to use a more simple format, while maintaining backwards compatibility with the old format. `unordered_list` now works with a simple list of items. Thanks for the patch, SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-26 01:11:20 +00:00
Malcolm Tredinnick 14b5e074ba Fixed #3311 -- Added naturalday filter to contrib.humanize. Thanks, Jyrki Pulliainen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 08:50:08 +00:00
Malcolm Tredinnick 7e8efcd4d9 Fixed #5087 -- Fixed support for TextField filtering with Oracle. Thanks, Ian Kelly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5943 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 12:37:00 +00:00
Malcolm Tredinnick 90c177f18e Fixed #5200 -- Added Polish localflavor. Thanks, Slawek Mikula.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 07:38:39 +00:00
Russell Keith-Magee 103fe15efc Added docstring to logout test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17 14:42:25 +00:00
Russell Keith-Magee 8dff1cd91d Fixed #5189 -- Added logout method to test Client. Thanks, Jakub Wisniowski <restless.being@gmail.com>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17 14:20:25 +00:00
Russell Keith-Magee 55c0b35acf Minor fix to get the fixure model test to pass in the new management framework.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17 14:02:40 +00:00
Malcolm Tredinnick fc041a3c1c Made output for invalid model tests more consistent (removed colored output).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5914 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17 12:29:08 +00:00
Adrian Holovaty 01adbb55e6 Major refactoring of django.core.management -- it's now a package rather than a 1730-line single module. All django-admin/manage.py commands are now stored in separate modules. This is backwards-incompatible for people who used django.core.management functions directly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16 06:06:55 +00:00
Malcolm Tredinnick 4bf3680dfa If SITE_ID isn't in the test settings, fake it. We need the sites framework, but the value of SITE_ID is currently unimportant, so we can transparently fix this error.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5893 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-15 11:29:58 +00:00
Malcolm Tredinnick ba29b7a97b Reverted [5887], at least for now. Both flatpages and redirects depend on the
sites app.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5892 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-15 11:25:22 +00:00
Adrian Holovaty 69cf1bb460 Removed django.contrib.sites from ALWAYS_INSTALLED_APPS in runtests.py. It was causing a test error for people who don't have SITE_ID set, and none of the tests required it, anyway
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-14 22:30:42 +00:00
Malcolm Tredinnick 3757f30c99 Fixed #4947 -- Avoid displaying uploaded file contents in the debug web page. Based on a patch from eibaan@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5874 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 12:02:08 +00:00
Malcolm Tredinnick 36be3febef Fixed #4622 -- Fixed SelectDateWidget to work correctly when used as a hidden input field. Thanks, Bill Fenner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 02:15:35 +00:00
Malcolm Tredinnick 31ba14761e Fixed #5134 -- Return empty strings as Unicode in psycopg1 backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-11 05:23:19 +00:00
Gary Wilson Jr 049212e950 Fixed #5115 -- Fixed `QuerySet` slices to allow longs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-08 21:09:55 +00:00
Russell Keith-Magee fbd1a6277e Fixed #3297 -- Implemented FileField and ImageField for newforms. Thanks to the many users that contributed to and tested this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-06 13:58:56 +00:00
Russell Keith-Magee f96e933534 Fixed #4001 -- Added dynamic save_m2m method() to forms created with form_for_model and form_for_instance on save(commit=False).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 07:39:36 +00:00
Gary Wilson Jr 212ee65be7 Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms `FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 05:14:46 +00:00
Gary Wilson Jr cdbd5751d3 Fixed #4228 -- Removed hardcoding of `RadioFieldRenderer` in the `RadioSelect` Widget so that the display of `RadioSelect`s can be more easily customized. `BoundField.__unicode__` also no longer special cases `RadioSelect` since `RadioSelect.render()` now returns a string like every other Widget.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-01 05:41:32 +00:00
Gary Wilson Jr f27774ee0a Fixed call to `ugettext`, which is imported as `_`.
Changed raise to conform to PEP 3109 and wrapped the long line.
Added beginnings of tests for model fields.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-30 17:25:35 +00:00
Russell Keith-Magee 650cea9170 Fixed #4460 -- Added the ability to be more specific in the test cases that are executed. This is a backwards incompatible change for any user with a custom test runner. See the wiki for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-28 04:02:52 +00:00
Adrian Holovaty 8831f3ee2c Added unit test that confirms a bug in ValuesQuerySets that have extra(select) specified. If the select dictionary has several fields, Django assigns the wrong values to the select-field names
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5767 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-27 21:53:02 +00:00
Russell Keith-Magee 1b7fe09660 Fixed #3771 -- Modified the test runner to observe the --noinput argument controlling script interactivity. This means that test scripts can now be put in a buildbot environment. This is a backwards incompatible change for anyone that has written a custom test runner. Thanks for the suggestion, moof@metamoof.net.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-23 12:14:32 +00:00
Gary Wilson Jr 304381616f Fixed #4952 -- Fixed the `get_template_sources` functions of the `app_directories` and `filesystem` template loaders to not return paths outside of given template directories. Both functions now make use of a new `safe_join` utility function. Thanks to SmileyChris for help with the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-23 04:45:01 +00:00
Gary Wilson Jr cae92ae615 Fixed #4373 -- Modified the get_object_or_404/get_list_or_404 shortcuts to also accept `QuerySet`s. Thanks SuperJared.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-22 03:41:11 +00:00
Russell Keith-Magee f2303b6f7a Fixed #4402 -- Modified test client to allow multi-valued inputs on GET requests. Thanks for the suggestion, eddymul@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-21 05:17:20 +00:00
Russell Keith-Magee 6a4f164a6f Added test cases for change [5739].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-21 05:15:19 +00:00
Adrian Holovaty 07dd6b2895 Fixed negligible typo in docstring in tests/regressiontests/test_client_regress/models.py from [5731]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 15:40:54 +00:00
Russell Keith-Magee 56394220d5 Fixed #4901 -- Modified assertContains to provide a default check of 'any instances of text in content'. Thanks for the suggestion, nis@superlativ.dk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 14:32:20 +00:00
Russell Keith-Magee 9922a04bb6 Fixed #3782 -- Added support for the suite() method recommended by the Python unittest docs. Thanks for the suggestion, rene.puls@repro-mayr.de.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 13:57:49 +00:00
Russell Keith-Magee 73bec372ee Fixed #4897 -- Fixed minor typo in doctest comment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 12:15:02 +00:00
Russell Keith-Magee 3fef1f4c8d Fixed #4558 -- Modified XML serializer to handle whitespace better around None tags. Thanks to Bill Fenner <fenner@gmail.com> for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5727 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 12:07:58 +00:00
Malcolm Tredinnick f5ef3bec68 Fixed #3925 -- Added Slovak localflavor items. Thanks, Martin Kosír.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5724 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-19 09:24:36 +00:00
Malcolm Tredinnick 2679bc0304 Fixed #4845 -- Fixed some problems with Unicode usage and caching. Thanks,
Jeremy Dunck.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-16 09:36:10 +00:00
Gary Wilson Jr f6ced03321 Refs #3012 -- Removed iterator from `test_data_types` cache test that I added in [5703]. Iterators cannot be pickled either. Left the rest of [5703] there though since it fixed another issue that was causing the `test_data_types` cache test to fail with the `locmem` cache backend, the fact that functions cannot be copied.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-16 05:00:18 +00:00
Gary Wilson Jr ae7f04caab Fixed #3012 -- Changed the locmem cache backend to use pickle instead of deepcopy to make it compatible with iterators (which cannot be copied). Patch from Sundance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-15 06:24:54 +00:00
Gary Wilson Jr b68f188628 Fixed #4310 -- Fixed a regular expression bug in `strip_entities` function and added tests for several `django.utils.html` functions. Based on patch from Brian Harring.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-15 05:03:28 +00:00
Malcolm Tredinnick f9d27b5d0b Fixed #4870 -- Removed unneeded import and fixed a docstring in an example.
Thanks, Collin Grady.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-14 14:50:35 +00:00
Malcolm Tredinnick 40bb32b5a4 Fixed #4469 -- Added slightly more informative error messages to max- and
min-length newform validation. Based on a patch from A. Murat Eren.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13 14:13:35 +00:00
Malcolm Tredinnick 92f54aff7a Fixed #4807 -- Fixed a couple of corner cases in decimal form input validation.
Based on a suggestion from Chriss Moffit.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5680 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13 09:09:59 +00:00
Russell Keith-Magee b8d0dc73c7 Fixed #4526 -- Modified the test Client login method to fail when a user is inactive. Thanks, marcin@elksoft.pl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12 15:26:37 +00:00
Russell Keith-Magee f3e71048c3 Fixed #4808 -- Added Chilean regions in localflavor. Thanks, Marijn Vriens <marijn@metronomo.cl>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12 12:44:05 +00:00
Russell Keith-Magee 81d313c9b1 Fixed #3768 -- Disabled NullBooleanField PK serialization test. We can't and don't test null PK values.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12 11:27:38 +00:00
Russell Keith-Magee 7a198f5105 Fixed #3770 -- Remove null=True tag from OneToOne serialization test. OneToOne fields can't have a value of null.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12 11:24:16 +00:00
Russell Keith-Magee 2d6d20def7 Fixed #4459 -- Added 'raw' argument to save method, to override any pre-save processing, and modified serializers to use a raw-save. This enables serialization of DateFields with auto_now/auto_now_add. Also modified serializers to invoke save() directly on the model baseclass, to avoid any (potentially order-dependent, data modifying) behavior in a custom save() method.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5658 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12 07:45:35 +00:00
Malcolm Tredinnick 87d8976fae Fixed #4804 -- Fixed a problem when validating choice lists with non-ASCII
data. Thanks, django@vonposer.de.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-10 12:03:36 +00:00
Malcolm Tredinnick 8c85ddf306 Fixed #4772 -- Fixed reverse URL creation to work with non-ASCII arguments.
Also included a test for non-ASCII strings in URL patterns, although that
already worked correctly.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-07 18:24:27 +00:00
Gary Wilson Jr 0816f380d2 Fixed #4779 -- Fixed a couple typos in the `test_client_regress` tests that surfaced when typo was corrected in [5620]. Thanks ferringb@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-06 04:04:42 +00:00
Malcolm Tredinnick d0b627acc2 Added a test that shows the problem in #4470. This fails only for the mysql_old
backend. Refs #4470.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-05 10:27:22 +00:00
Malcolm Tredinnick 953badbea5 Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:11:04 +00:00
Malcolm Tredinnick 3a892122f2 Made the reg-exp lookup tests more robust. they now pass for all database
backends and are not dependent on locale sorting order.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-01 04:47:46 +00:00
Jacob Kaplan-Moss 24512a74be Fixed #1465: added support for regex lookups. Thanks, Tom Tobin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-27 18:58:10 +00:00
Malcolm Tredinnick a5802b35dd Fixed #4453 -- Allow dots in URL pattern names (although the string in that case is first tried as an import path and only then falls back to being treated as a pattern).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-25 04:34:34 +00:00
Malcolm Tredinnick ac64e91a0c Merged boulder-oracle-sprint branch (r3965:5512) back into trunk. All
expected tests pass for all databases.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 14:16:00 +00:00
Malcolm Tredinnick 553a20075e Fixed #4527 -- Changed the way errors are displayed in Form.as_p() to avoid
invalid XHTML constructs. Based on a patch from SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 06:19:26 +00:00
Malcolm Tredinnick dfea6bdfa5 Fixed #4630 -- Fixed some validation problems with SplitDateTimeField. Thanks
glin@seznam.cz and SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 03:32:59 +00:00
Malcolm Tredinnick 284c6ba44b Fixed #4657 -- Fixed an error in an edge case of the urlizetrunc filter.
Thanks, SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 03:10:32 +00:00
Malcolm Tredinnick a33fb695e3 Fixed #4475 -- Fixed a problem that was preventing streaming tests for the
serializers from ever being run. Based on a patch from ian.g.kelly@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-10 03:06:34 +00:00
Russell Keith-Magee 16269c4d0a Fixed #3523 -- Added list unpacking to for loops in templates. Thanks to SmileyChris and Honza Kral for their work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-08 11:58:03 +00:00
Russell Keith-Magee ea07351799 Fixed #3466 -- Fixed problem with specifyin a 'fields' argument to a JSON serializer. Also added documenation for the 'fields' argument.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-01 13:39:08 +00:00
Jacob Kaplan-Moss bf2e62aa3c Fixed #3050: you can now use extra(select=...) with values(). Thanks, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-31 02:22:41 +00:00
Russell Keith-Magee c84ff156c1 Fixed a serialization problem with objects that have a foreign key on an object whose primary key is a OneToOneField.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-28 05:41:32 +00:00
Malcolm Tredinnick 193a83ca50 Added a new form test that I forgot to commit in [5348]. Refs #3718.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-26 09:47:47 +00:00
Malcolm Tredinnick 92c35a0617 Fixed #2365, #3324 -- Renamed FloatField to DecimalField and changed the code
to return Decimal instances in Python for this field. Backwards incompatible
change.

Added a real FloatField (stores floats in the database) and support for
FloatField and DecimalField in newforms (analogous to IntegerField).

Included decimal.py module (as django.utils._decimal) from Python 2.4. This is
license compatible with Django and included for Python 2.3 compatibility only.

Large portions of this work are based on patches from Andy Durdin and Jorge
Gajon.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@5302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-21 01:29:58 +00:00
Russell Keith-Magee edc0fcdf7c Moved markup tests into their contrib directory.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-20 04:08:14 +00:00
Russell Keith-Magee c9aa4c71ac Modified the django system test script to search for tests in the contrib apps.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-20 03:51:21 +00:00
Malcolm Tredinnick 534c0d8442 Fixed #4316 -- Added docstring and tests for django.newforms.utils.flatatt().
Thanks, Gary Wilson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-19 18:49:35 +00:00
Malcolm Tredinnick 9ed4217a57 Fixed #4337 -- Added pop() method to QueryDict. Thanks, Gary Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-19 18:34:00 +00:00
Malcolm Tredinnick b996e214c0 Changed the fix from [5231] so that the backwards-incompatibility is made more
obvious and everything still has nice names.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14 16:24:51 +00:00
Russell Keith-Magee 9350945963 Cleaned up the ordering of test data from [5232].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14 14:21:00 +00:00
Russell Keith-Magee c38a93e4d9 Fixed #4288 -- Modified serializers to pay attention to the to_field attribute on ForeignKeys. Thanks to Sandro Dentella for the report and the helpful test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14 14:14:49 +00:00
Malcolm Tredinnick f15036ae6d Renamed form-specific cleaning methods to be do_clean_*, rather than clean_*.
This avoids a name clash that would occur when you had a form field called
"data" (because clean_data is already a dictionary on the Form class).

Backwards incompatible change.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14 14:02:36 +00:00
Russell Keith-Magee c89dc9cfa0 Fixed some incorrect reporting of error messages in assertRedirects, and added test cases to validate.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14 11:07:14 +00:00
Adrian Holovaty 2c86d57284 Added unit tests and docs for the newforms case in which the form's data doesn't include a value for a nonrequired field
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14 02:57:42 +00:00
Russell Keith-Magee 2345029d0d Fixed #4018 -- Added code to allow callables as initial data in newforms. Thanks for the patch, David Danier.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-12 15:50:32 +00:00
Russell Keith-Magee 6aa5091d58 Added docs for form_for_model and form_for_instance, and added a fields argument so it is easy to create forms from a subset of model fields.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-12 14:42:46 +00:00
Russell Keith-Magee ca5e12b4ee Removed unit tests added in [5196]; didn't notice the tests in modeltests/model_forms.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-12 12:22:50 +00:00
Russell Keith-Magee 1bb3ed7264 Added unit tests for form_for_model and form_for_instance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-12 04:19:21 +00:00