Commit Graph

223 Commits

Author SHA1 Message Date
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 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
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
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
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 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
Malcolm Tredinnick f9982c5c08 Fixed #4270 -- Don't permit deleting of items from an immutable QueryDict.
Thanks, Gary Wilson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-11 08:22:06 +00:00
Russell Keith-Magee 70902908c7 Improved error reporting for assertions where there are no form errors, or a non-existent field has been provided. Also created a test client regression test, to hold the tests validating the failure cases of the TestCase assertions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-10 13:46:15 +00:00
Malcolm Tredinnick 1c53661bd1 Moved generic relations into django.contrib.contenttypes, since it depends on
that to work. Backwards incompatible change.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-08 10:59:35 +00:00
Malcolm Tredinnick 0839a0046a Fixed #4041 -- Added a __contains__ method to cache backends. Thanks, Gary
Wilson and SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-08 04:13:46 +00:00
Malcolm Tredinnick faa31732ca Fixed #3753 -- Allow optional display of invalid variable name in
TEMPLATE_STRING_IF_INVALID. Thanks, Matt McClanahan.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-08 03:36:16 +00:00
Adrian Holovaty 1889db475d Fixed comma splice in error message introduced in [5133]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5154 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-06 04:12:08 +00:00
Malcolm Tredinnick d943f5ae92 Fixed #4130 -- Added more self-explanatory error message when a typo is made in
a queryset field argument.

We may need to fine-tune the error message based on experience down the line,
but this stands as an improvement on its own. Thanks, Ned Batchelder.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-01 03:21:54 +00:00
Malcolm Tredinnick 0b2f9e89cd Fixed #3946 -- Added Swiss localflavor. Thanks, charly.wilhelm@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-01 03:10:10 +00:00
Malcolm Tredinnick d9f1a0aaef Renamed one test to avoid a name-clash with an earlier test of the same name.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-28 16:41:44 +00:00
Russell Keith-Magee 8a4a8023d6 Fixed #3698 -- Modified newforms labels to only add a colon if the label text doesn't end with punctuation. Thanks, SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-27 14:27:07 +00:00
Malcolm Tredinnick 592f1280f6 Added tests for Brazilian CRPF field that were accidentally omitted in [5089].
Refs #3957.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5108 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-27 12:50:24 +00:00
Malcolm Tredinnick 54f11ee63c Fixed #4164, #4171 -- Reworked some of the template lexer logic to ensure we
don't get caught out by a couple of corner cases.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-27 12:16:22 +00:00
Malcolm Tredinnick 6fe5235cea Renamed filter template tests to be in their own sequence. Makes it easier to
add tests if the related names aren't spread out across creation.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5103 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-27 11:01:45 +00:00
Adrian Holovaty 51e867a2e5 Fixed inconsistent period usage in localflavor.br error messages from [5089]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 15:05:47 +00:00
Malcolm Tredinnick 439cb4047f Fixed #4040 -- Changed uses of has_key() to "in". Slight performance
improvement and forward-compatible with future Python releases. Patch from Gary
Wilson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 13:30:48 +00:00
Malcolm Tredinnick 6c02565e4f Fixed #3957, #3945 -- Added CPF and CNPJ (some Brazilian identity numbers)
fields to the Brazilian localflavor. Thanks, onaiort@gmail.com and
danielvaz@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 13:11:07 +00:00
Russell Keith-Magee b24c860fa2 Fixed #3787, #3788 -- Corrected check for IndexError on MultiValueField, and fixed the value_from_datadict method for MultiWidgets to handle Multiwidgets containing Multiwidgets. Also added a testcase walking through the use of MultiWidget/MultiValueField. Thanks to Max Derkachev for reporting these issues and providing fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 12:46:04 +00:00
Malcolm Tredinnick ed60b8645f Fixed #4122 -- Added Chilean localflavor. Thanks, marijn@metronomo.cl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 12:41:34 +00:00
Malcolm Tredinnick a738f3a4ff Fixed #4143 -- Added Icelandic localflavor. Note that we use the is_/ directory
name because "is" is a reserved word in Python. Patch from
django@einaregilsson.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5080 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 08:43:25 +00:00
Malcolm Tredinnick aa1b182da3 Fixed #3543 -- Be a bit more tolerant of spaces following the comma
argument separator in the "url" tag.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-25 10:29:39 +00:00
Malcolm Tredinnick aca569804e Fixed #3964 -- Added a custom SortedDict.__repr__ so that the keys are printed
in sorted order. Based on a patch from Forest Bond.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-25 07:30:54 +00:00
Russell Keith-Magee 56b8914eb9 Fixed #3870, Refs #3787 -- Fixed handling of widget attributes on RadioSelect and MultiWidget. In particular, handling of the id attribute has been fixed. Thanks to Gary Wilson and Max Derkachev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-24 12:53:29 +00:00
Malcolm Tredinnick 2a512a4e83 Fixed #3749 -- Set the context correctly when using the "filter" template tag.
Thanks, Zak Johnson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-21 04:44:30 +00:00