Commit Graph

191 Commits

Author SHA1 Message Date
Russell Keith-Magee 1f0b1afbfe Fixed #3799 -- Added Lorem template tag for generation of random latin content. Thanks to SmileyChris for the implementation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-29 11:13:20 +00:00
Jacob Kaplan-Moss d6fd9fb22b Fixed #3826: added a {% with %}. Thanks, SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-27 17:25:56 +00:00
Adrian Holovaty f2861dad43 Fixed #3715 -- Added Japanese package to django.contrib.localflavor. Thanks, Makoto Tsuyuki
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-25 21:26:44 +00:00
Adrian Holovaty 955f4db6f4 Fixed #3813 -- Added French package to django.contrib.localflavor. Thanks, Fabrice Aneche
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-25 21:10:36 +00:00
Russell Keith-Magee b8eec54041 Fixed #3714 -- Fixed handling of indented text in wordwrap template filter. Thanks for the fix, Ian Clelland.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-20 11:07:52 +00:00
Russell Keith-Magee 83bed03a59 Fixed #3741 -- Fixed serialization of GenericRelations. Thanks for the report, Alexander Solovyov.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-19 11:57:53 +00:00
Malcolm Tredinnick f9c4ce5123 Fixed #2635 -- Added improved MySQL backend support from Andy Dustman. Also
added database.txt documentation; currently only describing Django-related
features of MySQL versions.

As of this commit, there are four known test failures due to (a) no transaction
support with MyISAM storage engine and (b) MySQLdb automatically creating
decimal types for Django's "float" field.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4724 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-14 12:08:19 +00:00
Russell Keith-Magee 7ccf9978ad Added unit tests to fully check the performance of the serializer engines.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-13 01:03:05 +00:00
Malcolm Tredinnick 8248569471 Fixed #3670 -- Fixed template argument parsing so that it understands negative
floats and integers as numeric types. Patch from SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-09 06:12:15 +00:00
Malcolm Tredinnick 22178d692a Fixed #3678 -- Implemented SortedDict.copy().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-09 05:34:42 +00:00
Malcolm Tredinnick 7d8687ea35 Fixed #3616 -- Added some more data structure tests from Chris McAvoy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-08 09:28:45 +00:00
Malcolm Tredinnick 43809de79d Fixed #1839, #2415, #2536 -- Fixed a generated name clash that was common in
self-referential and circular relations. A lot of community debugging went into
this fix, so thanks to bmurdock@gmail.com, Marek Kubica, ramiro, Michael
Radziej (the last two giving test cases showing the problem) and James Bennett
(who did the hard work to actually diagnose the true problem and fix it).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-08 03:21:35 +00:00
Malcolm Tredinnick f309bde7f6 Fixed #3654 -- Fixed test failure from [4665].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-06 01:12:46 +00:00
Jacob Kaplan-Moss 4eb7e298b6 Added a tearDown to the tests for #639 so that the "uploaded" image doesn't clog /tmp. Sorry, Joseph!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-01 00:02:04 +00:00
Jacob Kaplan-Moss 28ad156f10 Fixed #3488: Added "b" option to date format filter. Thanks, Gary Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-28 16:18:55 +00:00
Jacob Kaplan-Moss 6ca7930dd4 Fixed #2779: added a copy() method to MergeDict, along with some new tests for django.utils.datastructures. Thanks, Chris McAvoy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-28 00:35:50 +00:00
Jacob Kaplan-Moss 19e0bf1d44 Fixed #3465: template variable lookups like {{ foobar.13 }} now (correctly) fail silently on unsubscriptable objects. Thanks, Gary Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-27 20:25:27 +00:00
Jacob Kaplan-Moss 18ecf9dc85 Modified the test from [4609] to use a FileField instead of an ImageField (so that you don't have to have PIL installed to run the unit tests).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 17:50:21 +00:00
Jacob Kaplan-Moss a30e3fca48 Objects with FileFields no longer get save() called multiple times from the AutomaticManipulator! This fixes #639, #572, and likely others I don't know of.
This may be slightly backwards-incompatible: if you've been relying on the multiple-save behavior (why?), then you'll no longer see that happen.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 17:17:11 +00:00
Jacob Kaplan-Moss 907e4f840e Updated the dispatch unit tests to be consistant with our coding style.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 03:44:36 +00:00
Jacob Kaplan-Moss 357e26baf6 Fixed #3439: vastly improved the performance of django.dispatch (and added tests!). Thanks to Brian Harring for the patch. Note that one of the new tests fails under sqlite currently; it's not clear if this is a sqlite problem or a problem with the tests, but it appears not to be a problem with the dispatcher itself.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 03:17:04 +00:00
Jacob Kaplan-Moss a0157da26f Fixed #3518: Added unit tests for the humanize filters. Major thanks to Jyrki Pulliainen for the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-25 16:09:30 +00:00
Jacob Kaplan-Moss 36512d5d73 Fixed #343: filters that take strings now handle non-strings correctly. Thanks to Boffbowsh for the original patch, and to SmileyChris for the updated patch and tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4558 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-23 18:02:51 +00:00
Adrian Holovaty 08e406d146 Added newforms USPhoneNumberField in django.contrib.localflavor.usa
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-21 05:54:09 +00:00
Adrian Holovaty 5bec651a61 Added small newforms unit test
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4551 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-21 03:47:03 +00:00
Adrian Holovaty a52cc03374 Fixed #3490 -- Fixed issue with newforms ChoiceField and generators as choices. Thanksfor the patch, Chris.Wesseling@cwi.nl
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-20 03:05:09 +00:00
Adrian Holovaty 907241e299 Fixed #2455 -- Added newforms USStateSelect widget in django.contrib.localflavor.usa
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-20 00:30:22 +00:00
Adrian Holovaty b8fa80bd00 Fixed #3510 -- newforms validation errors are now HTML-escaped for HTML output. Thanks, scott@staplefish.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-19 23:54:55 +00:00
Adrian Holovaty 7cb7541971 Improved newforms to handle wacky characters in Field help_text
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-19 23:43:14 +00:00
Adrian Holovaty 4a85a75fb0 Fixed #3506 -- Changed newforms BoundField.help_text to an empty string if None. Thanks for the patch, Thomas Steinacher
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15 22:43:43 +00:00
Adrian Holovaty 1d5e974a4f Fixed #3503 -- Added newforms UKPostcodeField in django.contrib.localflavor.uk. Thanks for the patch, Jonathan Buchanan
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15 21:26:43 +00:00
Adrian Holovaty 1ce1442d95 Implented newforms USStateField in django.contrib.localflavor.usa. Refs #2455
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15 06:18:27 +00:00
Adrian Holovaty 27b28616b4 Created django.contrib.localflavor, for country- and culture-specific functionality. Moved django/newforms/extras/usa.py into there
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4524 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15 05:53:44 +00:00
Adrian Holovaty b93614ada6 Fixed #3409 -- Added render_value argument to newforms PasswordInput. Thanks for the patch, scott@staplefish.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4523 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15 05:05:43 +00:00
Adrian Holovaty a13a47e447 Fixed #3314 -- Fixed a bug in newforms smart_unicode. Thanks for the patch, nesh
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15 04:13:02 +00:00
Adrian Holovaty 6245816dd9 Fixed #3456 -- Made it easier/more intuitive to render newforms help_text in templates
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4521 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15 04:03:47 +00:00
Adrian Holovaty 2ec2bf6989 Fixed #1466 -- Added newforms USZipCodeField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-15 03:37:25 +00:00
Adrian Holovaty 0518205308 Implemented subclassing Forms in newforms
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-14 23:44:46 +00:00
Adrian Holovaty 9efa60dafb Fixed #3489 -- Changed newforms to use copy.copy() in constructing self.fields, so changes to self.fields in a given form instance do not affect other instances
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-13 18:04:47 +00:00
Malcolm Tredinnick a4ddecd15c Fixed #3155 -- Allow an integer to be passed to the urlencode filter. Patch
based on one from SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-13 05:50:55 +00:00
Malcolm Tredinnick 0fabbf8ce8 Fixed #2606 -- Added tag for working out the URL of a particular view function.
All work done by Ivan Sagalaev.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-13 04:24:58 +00:00
Malcolm Tredinnick 58ae80b5ea Changed one of the named endblock tests to test that nesting in the wrong order
is caught as an error.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-13 02:54:17 +00:00
Malcolm Tredinnick a0c354ee4e Fixed #3351 -- Added optional naming of the block in "endblock" tags to ensure
correct nesting. Thanks for the patch, SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-12 00:22:22 +00:00
Malcolm Tredinnick 6c4757729b Revert [4485] in order to fix accidental mod_python breakage. Refs #2920.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11 23:50:35 +00:00
Russell Keith-Magee 0e924c70b1 Refs #2920 -- Replaced implicit uses of _() with explicit imports or calls to gettext(). At some point post 0.96, we need to remove the calls that put _ into the builtins.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11 06:20:52 +00:00
Malcolm Tredinnick 5a0b72a6eb Fixed #2027 -- added truncatewords_html filter that respects HTML tags whilst
truncating. Patch from SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4468 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-10 02:51:27 +00:00
Malcolm Tredinnick ea7b3fd148 Fixed #3449 -- fixed regression test results so that they all pass now. Thanks
Brian Harring.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-09 22:09:07 +00:00
Adrian Holovaty cf75fcc832 Fixed #3255 -- Added help_text argument to newforms Field class.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-28 22:10:04 +00:00
Adrian Holovaty 546f16d323 newforms: Added a unit test that tests dynamic field addition with base fields defined on the class
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4438 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-27 22:16:16 +00:00
Adrian Holovaty c93686c698 Fixed #3334 -- Changed newforms Form class construction so that appending to (or altering) self.fields affects only the instance, not the class. As a consequence, self.fields is created in Form.__init__(). The form metaclass now creates a variable self.base_fields instead of self.fields.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4437 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-27 22:06:56 +00:00
Adrian Holovaty c0e01416b6 Fixed #3312 -- CheckboxSelectMultiple no longer uses duplicate ID attributes for each checkbox
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4436 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-27 21:41:32 +00:00
Adrian Holovaty 982a9443e1 Fixed #3300 -- Changed newforms Select widget to collapse 'choices' into a list if it's an iterable, so the iterable can be iterated over multiple times.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4435 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-27 21:30:26 +00:00
Adrian Holovaty 788f8f7454 newforms: Implemented NullBooleanField and NullBooleanSelect
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-24 05:23:19 +00:00
Adrian Holovaty 8a6c337f2a newforms: Added MultiValueField, SplitDateTimeField, MultiWidget, SplitDateTimeWidget
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-23 20:23:07 +00:00
Adrian Holovaty 76f6dd42cc Fixed #3196 -- Fixed inconsistency in setting choices on ChoiceFields dynamically
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-21 01:29:01 +00:00
Adrian Holovaty f073318668 newforms: Fixed confusing behavior when setting choices for ChoiceFields and their corresponding Widgets. Now, a Widget uses the choices from its ChoiceField regardless of whether the Widget has its own choices.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-21 01:10:55 +00:00
Adrian Holovaty a154d94e45 newforms: Added attrs optional argument to BoundForm.label_tag()
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-20 20:31:17 +00:00
Adrian Holovaty f2a3deb087 Fixed #3281 -- newforms: URLField now works properly with required=False and verify_exists=True together. Thanks, zendak
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13 05:19:15 +00:00
Adrian Holovaty 6b31f95516 Fixed #3293 -- newforms: Changed IntegerField.clean() to return None if field is not required and empty. Thanks, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13 05:08:07 +00:00
Adrian Holovaty a0137c41f3 Fixed #3289 -- newforms: Added value_from_datadict method to MultipleHiddenInput
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13 04:51:57 +00:00
Adrian Holovaty 663ef14f02 newforms: Added unit tests for MultipleHiddenInput
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13 04:43:34 +00:00
Adrian Holovaty 73d62743e9 newforms: Added unit tests and docs explaining that clean_data will only ever contain fields of the form, even if extra fields are passed in data
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-11 00:04:27 +00:00
Adrian Holovaty fa38ce7207 Fixed #3266 -- newforms: Made RadioSelect accept funky characters. Thanks for reporting, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-10 23:25:29 +00:00
Adrian Holovaty f6a7002ef1 Fixed #3278 -- newforms: Fixed bug in DeclarativeFieldsMetaclass where it inadvertently overrode the class' name. Thanks, russblau@imapmail.org
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-10 22:46:06 +00:00
Adrian Holovaty fb60a6ff0a Fixed #3193 -- newforms: Modified as_hidden() to handle MultipleChoiceField correctly. Thanks for the report, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09 05:12:25 +00:00
Adrian Holovaty 2e148d7064 newforms: Added 'initial' parameter to Form, which lets initial data be specified dynamically
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09 04:39:44 +00:00
Adrian Holovaty 02f690f738 newforms: Changed Form.ignore_errors to Form.is_bound, which is more descriptive and can be helpful to access at runtime
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-05 00:04:38 +00:00
Adrian Holovaty b1f6b376c0 newforms: Changed Form so that clean_data only exists if a Form is valid. Thanks for the idea, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-04 06:25:53 +00:00
Russell Keith-Magee c3f891210a Fixes #3176, #3004 -- Added an argument to the floatfilter to allow users to specify precision of floats, Thanks, Eric Floehr.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-03 05:29:34 +00:00
Russell Keith-Magee 9e0c5d1ecd Fixes #3217 -- Added regression tests for options on the Admin metaclass. Includes some tests that are commented out, as they are known failures. Thanks, Robert Myers (who has promised to fix the rest of the tests).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-03 04:14:17 +00:00
Russell Keith-Magee eecd90f5c2 Fixed problem with SelectDateWidget test caused by 2006/2007 year rollover. Thanks, Robert Myers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-03 03:58:11 +00:00
Adrian Holovaty 2cb0fe71a2 newforms: Added 'initial' parameter to Field. This allows you to specify initial data that will be displayed with the form if no data is given. Also added unit tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28 00:01:52 +00:00
Adrian Holovaty b5cd7d469d newforms: Added max_length and min_length optional arguments to RegexField, EmailField and URLField. Note that the argument order for those three fields has changed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26 23:46:10 +00:00
Adrian Holovaty d0fcef9db0 newforms: A label can now be the empty string, in which case a label won't be displayed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26 23:33:20 +00:00
Adrian Holovaty 30c2bffe17 newforms: Changed Form.as_table() to display errors in same <td> as the field
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26 23:16:16 +00:00
Adrian Holovaty 247fdc19ad newforms: Implemented RadioFieldRenderer.__getitem__(), which allows for index lookup on radio fields
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26 22:56:53 +00:00
Adrian Holovaty 86870e7587 newforms: Added django.newforms.extras.widgets, with SelectDateWidget implementation, plus some unit tests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-24 20:22:38 +00:00
Adrian Holovaty cd394a246a Fixed #3153 -- newforms 'label' argument now can contain wacky characters. Thanks, dswistowski
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-17 19:04:03 +00:00
Adrian Holovaty 546297be27 newforms: Implemented min_value and max_value options for IntegerField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 23:18:47 +00:00
Adrian Holovaty 26489d4e2a newforms: Fixed unexpected behavior with CharField(required=False, min_length=X). Thanks for reporting, Benjamin Slavin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 23:07:41 +00:00
Adrian Holovaty fc11b97e97 Fixed #3143 -- Added TimeField to newforms. Thanks, jkocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-14 20:35:32 +00:00
Adrian Holovaty d8a21981b7 Fixed #3139 -- newforms BoundField no longer returns empty errors when using a prefix. Thanks, jkocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-13 23:03:19 +00:00
Adrian Holovaty 6733c39804 Fixed #3112 -- Changed newforms Form.as_table() to use <th> instead of <td> for first column
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-13 06:44:57 +00:00
Adrian Holovaty 4add4e4272 Fixed #3114 -- newforms MultipleChoiceField now handles MultiValueDicts properly. Thanks for the patch, Honza Král
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-13 06:26:04 +00:00
Adrian Holovaty faaec9c28f Fixed #3132 -- Added prefix support for newforms. Thanks, jkocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-12 05:55:39 +00:00
Adrian Holovaty 05588b3797 newforms: Changed Form to use auto_id by default
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-11 02:38:18 +00:00
Adrian Holovaty d93021eb10 Fixed #3102 -- newforms: Fields can now designate their human-friendly labels. BoundField.verbose_name is now BoundField.label
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-08 20:06:12 +00:00
Adrian Holovaty f10a910577 newforms: Added Field.widget_attrs() hook, which lets a Field designate HTML attributes to use in its widget. Implemented CharField.widget_attrs(), which sets the HTML maxlength attribute for <input type='text'> and <input type='password'>. Thanks for the idea, Gary Doades
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-08 18:54:53 +00:00
Adrian Holovaty 7e269bd390 Fixed #3107 -- newforms: Added Form.as_p()
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07 06:34:37 +00:00
Adrian Holovaty 44add112e5 newforms: Form.as_ul() no longer puts hidden fields between <li>s. Similar to [4175], which was the same thing for Form.as_table(). Refs #3101
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07 06:17:06 +00:00
Adrian Holovaty 300f26deff Fixed #3101 -- newforms: Form.as_table() no longer puts hidden fields between <tr>s. Thanks for reporting, Eric
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4175 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07 06:06:58 +00:00
Adrian Holovaty 12e9a84429 newforms: Changed Table.as_table() and Table.as_ul() to put hidden-form errors at the top of the output rather than in field order
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-07 05:35:39 +00:00
Adrian Holovaty be217bce53 Template system now supports variables whose str() returns a Unicode object with non-ascii characters. Thanks, gabor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-05 19:48:46 +00:00
Adrian Holovaty 468993d13e newforms: Added check_test argument to CheckboxInput and changed its render() behavior slightly. Also changed CheckboxSelectMultiple to use checkboxes with the same name, rather than checkboxes with separate names
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-30 22:06:08 +00:00
Adrian Holovaty 89d1270e51 newforms: Added some more documentation to unit tests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4147 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-30 17:48:54 +00:00
Adrian Holovaty e130031fd2 Fixed #3082 -- newforms: Changed Form as_table() and as_ul() not to display verbose names for hidden fields, and to add field-name prefix to error messages to avoid user confusion. Also added unit tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4146 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-30 17:07:40 +00:00
Adrian Holovaty 4dca65cdfc newforms: Added BoundField.as_hidden()
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-30 03:58:25 +00:00
Adrian Holovaty 61c93842f4 newforms: Added BoundField.data property
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4143 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-29 21:48:58 +00:00
Adrian Holovaty 4a3ad338d6 newforms: Added Widget.value_from_datadict hook, which allows a Widget to define how to convert its post data dictionary to a value. Implemented it for CheckboxSelectMultiple and updated unit tests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-29 17:00:34 +00:00
Adrian Holovaty 8aae90c0e5 newforms: Implemented CheckboxSelectMultiple
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-29 03:02:26 +00:00