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
Russell Keith-Magee
f2582eb972
Fixes #2333 -- Added test fixtures framework.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-01 13:11:08 +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
4477f50f0b
Added a "depth" argument to select_related() to control how many "levels" of relations select_related() is willing to follow (refs #3275 ).
...
Also added unit tests for select_related().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4645 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-28 15:24:05 +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
516aa4436c
Fixed #2490 : Added a polite note to runtests.py about setting DJANGO_SETTINGS_MODULE or --settings.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 22:34:56 +00:00
Jacob Kaplan-Moss
2cd6db682f
Fixed a few Python2.3-related bugs in the tests (see #3396 ). A few more left, though.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 18:50:55 +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
51f39d59bd
Fixed #3390 : the serializer can now contain forward references. Thanks, Russ.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 17:33:27 +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
Russell Keith-Magee
f313e07b6e
Fixed #3253 -- Exposed the number of failed tests as a return code in manage.py and runtests.py.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 12:52:01 +00:00
Jacob Kaplan-Moss
6bd07383c0
Fixed #3172 : Model.validate() no longer raises TypeErrors on empty Date*Fields. Thanks, floguy@gmail.com.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 05:07:12 +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
abc949f584
Changed database PhoneNumberField to use USPhoneNumberField as its newforms form field (instead of IntegerField)
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-21 05:59:46 +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
ee96c7eb2d
Fixed #3534 -- newforms ModelChoiceField and ModelMultipleChoiceField no longer cache choices. Instead, they calculate choices via a fresh database query each time the widget is rendered and clean() is called
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-21 05:14:28 +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
bdfbcb2cd5
Fixed #3247 -- newforms form_for_model() and form_for_instance() no longer create form fields for database fields with editable=False. Thanks for the patch, mssnlayam@yahoo.com and Philipp Keller
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-20 02:59:16 +00:00
Adrian Holovaty
e56934b9b9
Fixed #3257 -- Added newforms ModelChoiceField and ModelMultipleChoiceField, which are now used by form_for_model() and form_for_instance(). Thanks for the patch, Honza Kral, floguy@gmail.com and kilian.cavalotti
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-20 02:42:07 +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
Russell Keith-Magee
d6d51c9546
Fixed #3160 -- Added the ability to control the content type in a test client POST request. This is to allow easier testing of json-rpc/xml-rpc/soap etc interfaces. Thanks to Mikeal Rogers for the suggestion, and Ben <afternoon@uk2.net> for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4529 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-17 00:23:09 +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
4c4209b144
Changed __year lookup to use a BETWEEN SQL statement instead of comparing the result of EXTRACT(year). This should be more efficient.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-14 06:32:32 +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
d123588184
#fixed #2256 -- Made count() interact with slicing on QuerySets. Patch from
...
SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-12 00:16:17 +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
Russell Keith-Magee
f9cdde0cb4
Fixed #3162 -- Added coded to catch and rethrow exceptions that are thrown by the views visited by the test client. Thanks, Ben <afternoon@uk2.net>.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11 00:23:31 +00:00
Adrian Holovaty
007f17d63e
Fixed #3463 -- EmptyQuerySet's iterator() now returns a generator. Thanks, Gary Wilson
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-10 05:38:38 +00:00
Adrian Holovaty
766e339666
Improved runtests.py to normalize MIDDLEWARE_CLASSES during test execution. Some tests were failing for me because my custom MIDDLEWARE_CLASSES setting didn't have sessions or authentication installed
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4473 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-10 04:01:19 +00:00
Malcolm Tredinnick
e57ce6b157
Fixed #2348 -- Improved error reporting when query filter arguments are
...
misspelt. Variation on a patch from Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4470 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-10 03:39:56 +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
Russell Keith-Magee
9ba27afce0
Added a ``session`` attribute to the test Client, to make it easier to test if session variables have been modified in a view. Also renamed Client.cookie to Client.cookies, to match documentation and common sense.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-09 13:47:36 +00:00
Jacob Kaplan-Moss
1e3d035fcc
Fixed Python 2.4-ism in modeltests/test_client. Thanks for the find, Robert Myers.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-29 16:48:31 +00:00
Adrian Holovaty
d28a63cc00
Fixed #3389 -- Many-to-many sets can now be assigned with primary key values
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-29 16:09:25 +00:00
Adrian Holovaty
829e4c70f8
newforms: Changed database Field formfield() methods to pass help_text to the formfield help_text
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-28 22:36:02 +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
83768bf067
Fixed #3263 -- newforms form_for_model() and form_for_instance() now handle foreign-key and many-to-many data properly. Thanks for the patch, Jeff Hilyard
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-28 04:56:54 +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
Russell Keith-Magee
db8525cc01
Fixed a flaw in the serializers that prevented OneToOneFields being serialized as JSON objects.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-27 13:42:51 +00:00
Russell Keith-Magee
54feaca70f
Fixed #3098 -- Added db_table parameter to m2m fields, allowing the specification of a custom table name for the m2m table. Thanks, Wolfram Kriesing.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-25 13:47:55 +00:00
Russell Keith-Magee
12ad69c0b4
Fixed #3215 , #3081 , #2749 -- Fixed problem with mistaken deletion of objects when a GenericRelation is involved. Thanks to Thomas Steinacher for helping to narrow down the problem ( #3215 ), and Alex Dedul ( #3081 ) for the starting point of a working patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-25 11:24:17 +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
13280259a8
Fixed #3283 -- Added support for empty QuerySets via none() method. Thanks for the patch, medhat
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-23 02:11:08 +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
963ccd7cb4
Fixed #3267 -- newforms: Changed database TextField to render as Textarea in form_for_model() forms. Thanks for the patch, Philipp Keller
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4305 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-10 23:34:37 +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
78b89ff118
Fixed #3232 -- newforms: Added save_instance(), which saves a given bound form's clean_data into a given model instance with the same field names
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09 05:49:47 +00:00
Adrian Holovaty
d08112a6a7
newforms: Changed model auto-Form generation so that create() and apply_changes() are now both called save() -- for the purposes of simplicity
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4299 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09 05:22:48 +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
0421b2597f
Fixed #3252 -- Fixed bugs in model_forms unit tests, related to recent newforms clean_data change. Thanks for the patch, mir@noris.de
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4294 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-08 18:06:22 +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
ddb9b7d57a
Fixed #2473 -- Added special case for '__in=[]' (empty set) queries, because 'WHERE attr IN ()' is invalid SQL on many backends. Thanks, Gary Wilson.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-04 04:00:16 +00:00
Russell Keith-Magee
e1c6e987d0
Fixed #2756 -- Modified the get_object_or_404/get_list_or_404 shortcuts to accept model managers as well as model classes. Thanks, Gary Wilson.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-03 14:16:58 +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
5a01f848ca
Updated docstring in model_forms unit test
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4263 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-30 06:14:39 +00:00
Adrian Holovaty
b9fdf9abb8
newforms: Got form_for_instance() to select initial ManyToManyField values properly
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-30 00:12:02 +00:00
Adrian Holovaty
bcb7a31b2c
newforms: Implemented apply_changes() method for form_for_instance Forms
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28 02:34:53 +00:00
Adrian Holovaty
71ce11f617
newforms: Implemented form_for_instance(). The resulting Form class does not yet have a method that saves the changes
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28 01:16:29 +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
6a75c8a52e
newforms: Implemented formfield() for database ForeignKey class and added unit tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-27 05:23:21 +00:00
Adrian Holovaty
d853278253
newforms: Implemented formfield() for database ManyToManyField class and added unit tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-27 05:15:22 +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
Russell Keith-Magee
e859f108f1
Fixed problem with assiging an empty list to m2m related descriptors, introduced in [4231].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-20 13:57:17 +00:00
Russell Keith-Magee
3a54d0cd5b
Fixed #3164 -- Added explicit ordering to basic model test, and revised results to suit the explicit order. Thanks to Matt Boersma for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-19 03:38: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
a0ef6f6915
newforms: Added optional 'form' parameter to form_for_model
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-17 05:12:53 +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
4f5170bffe
newforms: The Form classes created by form_for_model() now have a create() method, which creates a model instance from the clean_data
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 22:33:24 +00:00
Adrian Holovaty
5cb093b033
newforms: Changed form_for_model() to ignore a field if its formfield() returns None, and changed AutoField.formfield() to return None
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 21:22:13 +00:00
Adrian Holovaty
35f7e33b4a
Implemented formfield() for a bunch of database Field classes
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 18:32:42 +00:00
Adrian Holovaty
cfb1c5feff
Changed runtests.py to set USE_I18N=True during test running, because the template tests assume it. Some template tests were failing because my personal settings have USE_I18N=False
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 06:06:52 +00:00
Adrian Holovaty
6001974e45
newforms: Added initial implementation of form_for_model and form_for_fields
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 05:46:11 +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
Adrian Holovaty
fe4af48ec8
newforms: The <input> tags in a RadioSelect now each have a distinct ID. Also, this plays nicely with auto_id and <label>s for Form.as_table() and Form.as_ul(). Refs #3064
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-29 01:40:27 +00:00
Adrian Holovaty
bb45c394a6
Fixed #3064 -- newforms: Added <label> support through BoundField.label_tag() method. Also added BoundField.verbose_name and added/updated unit tests. Thanks, SmileyChris
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-29 00:49:27 +00:00
Adrian Holovaty
3d89f26b08
newforms: Changed Form unit tests to use f.clean_data rather than f.clean(), because the latter is a validation hook, not a way to get the clean data
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-28 23:14:18 +00:00
Adrian Holovaty
190c987e63
newforms: Normalized all error <ul>s to use class='errorlist'
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-27 04:56:33 +00:00
Adrian Holovaty
49236b95e9
newforms: Added Form.non_field_errors() and added more examples/documentation to the unit tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-27 04:49:26 +00:00
Adrian Holovaty
126e0ec0c3
Fixed #3026 -- newforms: Form class now suppresses validation and errors if no data (or None) is passed in. Validation still happens if you pass in an empty dictionary. Also updated unit tests. Thanks, SmileyChris
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-27 03:49:19 +00:00
Adrian Holovaty
682e435c5f
newforms: Changed Form.errors to be a property rather than a function. Refs #3026
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-27 01:55:24 +00:00
Adrian Holovaty
56ad38a826
newforms: Added a bunch of unit tests and fixed some bugs in the case of required=False for various Field subclasses
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-27 00:49:26 +00:00
Adrian Holovaty
2e4ff8ee0c
Fixed #3038 -- newforms: RegexField no longer validates empty input for required=False. Thanks for reporting, Thomas Steinacher
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4111 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-27 00:23:17 +00:00
Adrian Holovaty
4a14f2e233
Fixed #3065 -- newforms: Fixed rendering problem with RadioSelect as a member of a Form. Also fixed some Unicode issues and added unit tests. Thanks for reporting, Derek Hoy
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-26 18:44:58 +00:00
Adrian Holovaty
5836b140fa
newforms: Added unit test to test field order. Refs #3054
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4092 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-23 17:16:15 +00:00
Adrian Holovaty
6dd4e6d046
newforms: Fixed #3008 -- Widgets now support strings containing utf-8 characters. Thanks for reporting, Nebojša Đorđević
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-16 06:45:29 +00:00
Adrian Holovaty
75516392b8
newforms: Fixed #3027 -- Changed Form as_table(), as_ul(), as_table_with_errors() and as_ul_with_errors() to exclude <table> and <ul>. Good idea, SmileyChris
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-16 01:16:33 +00:00
Adrian Holovaty
05420093ae
newforms: Added unit test showing it's possible to construct the fields in a Form dynamically
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4074 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-15 23:17:00 +00:00
Adrian Holovaty
c4070e86c8
Fixed #3025 -- Added auto_id option to Form.__init__(). Thanks, SmileyChris
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-15 23:09:10 +00:00
Adrian Holovaty
522f674070
newforms: Implemented RadioSelect, with unit tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4072 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-15 22:08:22 +00:00
Jacob Kaplan-Moss
b1b4e8e7c4
Fixed #2800 : the ifchanged tag now can optionally take paramaters to be checked for changing (instead of always using the content). Thanks, Wolfram Kriesing.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-07 05:36:51 +00:00
Jacob Kaplan-Moss
d4d1a22730
Fixed #2575 : ObjectPaginator now accepts a "orphans" option to prevent pages with only a few items. Thanks, SmileyChris.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-07 04:44:27 +00:00
Adrian Holovaty
46b0713315
django.newforms: Implemented hook for validation not tied to a particular field. Renamed to_python() to clean() -- it's just...cleaner. Added Form.as_table(), Form.as_url(), Form.as_table_with_errors() and Form.as_ul_with_errors(). Added ComboField. Updated all unit tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-04 20:49:59 +00:00
Adrian Holovaty
6645d1fe48
Added ChoiceField, MultipleChoiceField to django.newforms
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-02 03:16:12 +00:00
Adrian Holovaty
36786d28f5
Implemented SelectMultiple in django.newforms.widgets
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-02 01:06:12 +00:00
Adrian Holovaty
964ccd1023
Updated forms unit tests to reflect new fields and widgets from [3955] and [3956]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3957 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-01 23:54:17 +00:00
Adrian Holovaty
bcba29fcd6
Changed forms unit tests to reflect the fact that render() does not use the to_python() value of data
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-28 20:59:23 +00:00
Adrian Holovaty
88a2f53b85
Split django.newforms into forms, fields, widgets, util. Also moved unit tests from docstrings to a standalone module in tests/regressiontests/forms, to save docstring memory overhead, keep code readable and fit our exisitng convention
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3945 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-28 20:34:37 +00:00
Adrian Holovaty
48234a0925
Fixed #2961 -- Added 'opencomment' and 'closecomment' options to {% templatetag %} templatetag. Thanks for the patch, Jeong-Min Lee
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-27 01:58:13 +00:00
Adrian Holovaty
60b46d72ac
Fixed #648 -- Added comment syntax to template system: {# #}. Thanks for the patch, mccutchen@gmail.com and Hawkeye
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-24 21:30:38 +00:00
Russell Keith-Magee
fbbbf8b9a1
Fixes #2737 -- Added code to allow None as a query value for __exact queries, raising an error otherwise. __exact=None is interpreted as the SQL 'value = NULL'. This fixes some minor problems with queries on unsaved objects with related object sets, and stops queries with a value of None being outright ignored (even if they reference an unknown attribute).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-14 02:48:05 +00:00
Malcolm Tredinnick
875e7cb815
Fixed #2099 -- Allow timezone tests to be ignored on Windows systems, due to
...
lack of time.tzset(). Patch from SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 13:38:19 +00:00
Malcolm Tredinnick
9c0568e21e
Fixed #2208 -- Allow empty arguments to be passed to filters. Thanks, mattmcc.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 07:26:07 +00:00
Malcolm Tredinnick
4ed82677be
Fixed #2783 -- Fixed one-to-one fields to work with any primary key data type
...
in the related model. Thanks, Joel Heenan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3846 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 02:58:36 +00:00
Russell Keith-Magee
0c41869e6c
Made ``pk`` a generic expansion for the primary key, rather than just an expansion for __id__exact.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25 13:49:01 +00:00
Malcolm Tredinnick
6dacb3d10b
Fixed #2729 -- Handle initial SQL with different line-ending styles (Windows
...
vs. Unix vs. Mac). Thanks, Simon Greenhill.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3821 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25 07:36:46 +00:00
Malcolm Tredinnick
bd4c22be0b
Fixed #2454 -- Make "ifchanged" tag work more predictably inside nested
...
for-loops. Thanks, dummy@habmalnefrage.de .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-23 09:49:58 +00:00
Malcolm Tredinnick
670e8ab704
Fixed #2456 -- Added backslash escaping to addslashes, which is necessary once
...
you start escaping other things. Thanks, tom@eggdrop.ch .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3799 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-23 08:41:09 +00:00
Malcolm Tredinnick
d296e5e565
Fixed #2743 -- Made the value of a cycle tag accessible through the context.
...
Patch from Martin Glueck.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-21 13:09:00 +00:00
Russell Keith-Magee
5a9839c547
Fixes #2653 -- Modified related field utility methods to return None as the related name for symmetrical m2m fields on self. Updated validators and unit tests to account for the new behavior.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3734 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-07 13:29:56 +00:00
Russell Keith-Magee
cfe77946d7
Fixes #2637 -- Clarified handling of TEMPLATE_STRING_IF_INVALID, especially with regards to filtering of invalid values. Modified unit tests to test both empty and non-empty values for TEMPLATE_STRING_IF_INVALID. Thanks to SmileyChris for identifying and helping to resolve this bug.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-04 14:02:11 +00:00
Russell Keith-Magee
826b9ff5e5
Refs #2333 - Added model test for the test Client.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3708 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-02 09:34:40 +00:00
Russell Keith-Magee
d78e2ae355
Refs #2333 - Added a TEST_DATABASE_NAME setting that can be used to override the 'test_' + DATABASE_NAME naming policy. This setting is then used in runtests.py to restore the use of 'django_test_db' as the Django model/regression test database. Thanks to Michael Radziej for the feedback.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-01 13:33:26 +00:00
Adrian Holovaty
fe5462e57a
Fixed typo in docstring of get_latest model unit test
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-31 03:16:08 +00:00
Russell Keith-Magee
97b9ad73b4
Refs #2333 - Modified runtests script to use new testing framework. Migrated existing tests to use Django testing framework. All the 'othertests' have been migrated into 'regressiontests', and converted into doctests/unittests, as appropriate.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-27 13:59:47 +00:00
Adrian Holovaty
74f5d2b9b0
Fixed #2528 -- Fixed 'time' template filter for midnight time value. Thanks, django@dougma.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-12 05:09:12 +00:00
Adrian Holovaty
23964a7b9a
Fixed #2458 -- DB API now properly escapes backslashes, so you don't have to double-escape them. Thanks, tom@eggdrop.ch
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-11 05:20:31 +00:00
Malcolm Tredinnick
a6a402a7db
Fixed #2512 -- Fixed SQL error when saving existing empty models.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-10 03:55:03 +00:00
Adrian Holovaty
3770dbde3c
Added urlpatterns_reverse unit tests, which test the reverse lookup of URLs
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3471 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-28 02:08:36 +00:00
Jacob Kaplan-Moss
847b1ed54e
Fixed #1650 : the {% extends %} tag now can extend a Template object passed into the context. Thanks, clelland@gmail.com.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-27 23:23:55 +00:00
Malcolm Tredinnick
dd19218f4e
Fixed #2397 -- fixed markdown test to be a bit more lenient in what counts as a
...
pass due to whitespace differences between markdown versions. Thanks to
shields@msrl.com for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-22 02:47:17 +00:00
Malcolm Tredinnick
4537cf3dd4
Fixed the timeuntil and timesince filter tests to not fail if the system clock
...
ticks over during the tests. Also fixed the template tests to be able to run in
standalone mode again.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-15 12:32:14 +00:00
Adrian Holovaty
79b7fc17a1
Small formatting change to m2m_and_m2o model unit test
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11 03:20:11 +00:00
Adrian Holovaty
1805bbb6cd
Changed runtests.py to set USE_I18N=True for testing
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3319 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11 03:09:14 +00:00
Malcolm Tredinnick
a778c9de47
Fixed #1578 -- fixed a corner-case where we still wanting core=True attributes
...
on a model that was not being edited inline.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 10:48:07 +00:00
Russell Keith-Magee
b9d9351e85
Fixes #2202 -- Added ability to customize output of pluralize filter to handle irregular cases (walrus/walruses, cherry/cherries). Thanks to gid for the suggestion and the initial patch
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 06:18:39 +00:00
Russell Keith-Magee
6b383afd39
Fixes #1338 , Refs #1400 , #2237 -- Modified variable resolution to allow template 'if' statements to work if TEMPLATE_STRING_IF_INVALID is set. Modified unit tests to force the use of this variable, so that returning '' isn't confused with an actual failure.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3268 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 03:21:44 +00:00
Russell Keith-Magee
cd7b54aab0
Fixes #2271 -- Added code to imply !__exact on any query argument that doesn't finish with a known query term.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 03:14:33 +00:00
Russell Keith-Magee
c81d69354a
Fixed #2217 -- Allowed raw objects to be used in __exact and __in query terms. Existing use of primary keys in query terms is preserved.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 01:14:41 +00:00
Jacob Kaplan-Moss
c9032ab07f
Added a JSON serializer, a few more tests, and a couple more lines of docs.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-29 16:42:49 +00:00
Jacob Kaplan-Moss
4ea7a11659
Added initial cut at serialization framework, along with some basic tests and a stab at some docs. This is all a bit rough right now, so expect some bumps.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 16:00:37 +00:00
Malcolm Tredinnick
414bc24e81
Fixed #1754 , #2211 , #2192 -- allow date filtering comparisons to use strings as
...
well as date objects. Fixed a couple of admin crashes as well.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 11:37:17 +00:00
Jacob Kaplan-Moss
48562965b9
Added {{{Manager.create()}}} method to create and save an object in a single step.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-27 20:36:25 +00:00
Russell Keith-Magee
2adbe11678
Fixes #2216 -- Added extra tests for model validity, and cleaned up warning messages for existing tests. Models are now invalid if the query string required to access a field (or related object) would clash with the name of another field (or related object). Previous tests only checked the accessor names, not the query string.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-27 15:21:43 +00:00
Russell Keith-Magee
dc473309ef
Fixed #1661 -- Added logic for string-form model references in the 'to' argument of OneToOneFields. Includes regression test.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 08:16:36 +00:00
Russell Keith-Magee
0d4b5b9b4a
Fixed #1662 -- Added resolver for string-form model references for models that have already been loaded, with tests to validate both forward and backward referenced model names. Light refactoring of model loading to make regression tests behave more like normal model loading. Also clarifies the text of some validation errors.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 04:37:00 +00:00
Malcolm Tredinnick
68cfd446a3
Fixed the "timeuntil" and "timesince" tests so that they don't fail on a
...
machine under heavy load.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 12:11:00 +00:00
Malcolm Tredinnick
ae1234f2a2
Fixed #2163 -- Corrected typo when handling datetimes with timezones in the timesince filter. Thanks, Alex Dedul.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 11:11:03 +00:00
Malcolm Tredinnick
239adf83d3
Fixed #2053 -- added an optional comparison argument to the "timesince" filter.
...
Added a "timeuntil" filter that works analogously. Thanks, john@sneeu.com .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 06:56:08 +00:00
Adrian Holovaty
0e92f70602
Fixed runtests.py problem from [3177] where it assumed you were running the tests from within the tests directory
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 14:27:44 +00:00
Adrian Holovaty
5f47161831
Added semicolon test to regressiontests/initial_sql_regress/sql/simple.sql
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 14:11:59 +00:00
Malcolm Tredinnick
92571b0d48
Fixed #2119 -- fixed problems with splitting SQL statements into separate
...
statements. Uses a patch from eaw@woudy.org and some contributions from
jpellerin@gmail.com . Also fixes #2034 and #1935 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 08:00:44 +00:00
Malcolm Tredinnick
3e97535907
Fixed #2161 -- handle trailing newlines in initial SQL data. Includes
...
regression test. Thanks to russellm.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 07:12:45 +00:00
Malcolm Tredinnick
a513fcb455
Added regressions tests to ensure that one-to-one and many-to-many fields
...
continue to interact properly. Refs #1064 . Refs #1506 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 05:29:19 +00:00
Adrian Holovaty
b93de6a2cb
Fixed bad formatting in 'lookup' model tests from [3157]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3170 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 04:16:11 +00:00
Adrian Holovaty
15cbc67ea2
Fixed #2195 -- Fixed spelling error in generic_relations model test. Other errors were fixed earlier today. Thanks, Tom Tobin
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 03:03:43 +00:00
Malcolm Tredinnick
a8a133cc6c
Fixed #1857 -- Fixed get_previous_by_FIELD and get_next_by_FIELD to work
...
properly with keyword arguments. Patch from tom@jerakeen.org .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 02:17:14 +00:00
Adrian Holovaty
ed6d7285dd
Fixed some small typos in generic_relations model tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-19 20:19:01 +00:00
Malcolm Tredinnick
1fc3b3229a
Fixed #1683 -- Permit initialising models using settable properties as well as
...
field names.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-19 02:34:32 +00:00
Malcolm Tredinnick
75a8a32f86
Fixed #2181 -- allow '{' and '}' to be escaped via {% templatetag ... %}.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-18 04:12:55 +00:00
Jacob Kaplan-Moss
bca5327b21
Added generic foreign key support to Django. Much thanks to Ian Holsman and
...
Luke Plant -- most of this code is theirs. Documentation is to follow; for now
see the example/unit test. Fixes #529 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-16 19:18:30 +00:00
Jacob Kaplan-Moss
174e334d92
Test harness actually now installs contrib apps so they can be used in tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-16 18:58:45 +00:00
Malcolm Tredinnick
28e643743f
Fixed #2164 -- Create correct SQL when pk column name is not the same as the
...
attribute name. Thanks, Russell Cloran.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-15 11:28:28 +00:00
Malcolm Tredinnick
686c5a2f88
Fixed the empty model saving case so that it retrieves the primary key id. Also
...
updated the tests to test this case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-12 12:49:14 +00:00
Malcolm Tredinnick
4fc6e51706
Tests to avoid regressions for ticket #2108 . See also r3115.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 15:15:27 +00:00
Adrian Holovaty
2abfd5dd58
Fixed #2109 -- Convert old-style classes to new-style classes throughout Django. Thanks, Nicola Larosa
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 05:00:13 +00:00
Adrian Holovaty
5edd1335b2
Added django.template.Token.split_contents() and used it to add support for strings with spaces in {% ifchanged %}
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 04:29:10 +00:00
Adrian Holovaty
e5cd46d6d1
Fixed #2026 -- Added support for 'and' in template 'if' tags, added dozens of unit tests and updated docs. Thanks, ckknight
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3108 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 03:33:21 +00:00
Malcolm Tredinnick
89920e058f
Fixed #2108 -- do not try to save an empty model.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 00:13:52 +00:00
Malcolm Tredinnick
58ab678d35
Fix test output as a result of the change in r3094.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3103 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-07 09:19:43 +00:00
Adrian Holovaty
b3a6348bc2
Added Manager.get_or_create()
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3092 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-07 00:09:29 +00:00
Adrian Holovaty
a5b7c29816
Changed all model unit tests to use __str__() instead of __repr__(). Also slightly changed related-object DoesNotExist exception message to use repr instead of str
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-04 00:23:51 +00:00
Adrian Holovaty
55e453a09c
Changed 'transactions' model unit test NOT to be executed for MySQL
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3074 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-03 23:45:49 +00:00
Adrian Holovaty
142e59b462
Fixed #2077 -- Renamed 'repr' model tests to 'str'
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3072 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-03 22:14:04 +00:00
Adrian Holovaty
8ac9bb7ddf
Fixed unit-test output error in m2m_and_m2o unit tests, due to a change in the model's __repr__ earlier today
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-01 04:30:39 +00:00
Adrian Holovaty
cb9cb2045b
Fixed #720 -- Added first_on_page() and last_on_page() methods to ObjectPaginator. Thanks, m@bagai.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-01 04:29:39 +00:00
Adrian Holovaty
02fcfe6216
Cleaned up numbering with model unit tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-31 19:23:07 +00:00
Adrian Holovaty
a846155118
Small formatting changes to model unit tests to make them look better in the model examples online
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-31 19:10:43 +00:00
Adrian Holovaty
3daae59aab
Added blurbs to the model unit tests that didn't have them
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-31 18:45:17 +00:00
Luke Plant
60c3e55b1f
Fixed bug with QuerySet.exclude() failing to do negations on Q objects, and
...
at the same time generalised exclude/QNot so that they work for 'external'
Q objects i.e. ones that simply have 'get_sql' defined.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26 23:41:43 +00:00
Jacob Kaplan-Moss
c3baf4668f
Django's tests now include models from django.contrib; this will allow testing against those models.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2996 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26 21:28:12 +00:00
Luke Plant
0c8ac0972c
Made negative indexing on QuerySet instances raise an assertion error (previously
...
it just returned incorrect results).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26 18:41:03 +00:00
Luke Plant
a666b98783
Fixed bug with Meta.ordering being ignored when slicing a single item off a QuerySet. Thanks, Gábor Fawkes.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-23 19:55:30 +00:00
Jacob Kaplan-Moss
e6ee971498
The tests now run correctly with the new psycopg2 backend. There's 4 failures, but they all have to do with the new way the psycopg2 handles datetimes and are probably a single fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-18 18:25:49 +00:00
Jacob Kaplan-Moss
5a8ed6f7f6
Fixed whitespace in tests/runtests.py
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-18 18:03:27 +00:00
Adrian Holovaty
c643e12faf
Fixed #1321 -- Made DJANGO_SETTINGS_MODULE optional. You can now call django.conf.settings.configure() to set settings manually if you don't have a settings module. Thanks, Malcolm Tredinnick, Luke Plant, Fredrik Lundh
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-16 21:28:06 +00:00
Malcolm Tredinnick
1006d6eb06
Fixed #1530 -- make count() respect distinct() on QuerySets. Create some
...
tests for this as well. Thanks to Adam Endicott for the original patch on which
this is based.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-14 23:49:29 +00:00
Luke Plant
c427479539
Updated tests in line with changed exception messages, fixing 2 failures.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-11 21:52:23 +00:00
Luke Plant
4116403a55
Updated 'or_lookup' tests to give example of more compact syntax, for the sake of autogenerated docs.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2897 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-11 21:51:24 +00:00
Adrian Holovaty
0727df90f0
Fixed #1781 -- Fixed unit tests to use new error message for DoesNotExist. Thanks, pb
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 18:36:32 +00:00
Luke Plant
f57e34e990
Fixed #1579 - added support for 'Q' objects in limit_choices_to.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 00:26:24 +00:00
Adrian Holovaty
69d6bd7af3
Fixed #1745 -- Accessing many-to-many relationships without a PK value now throws an exception. Thanks, Luke
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 19:51:41 +00:00
Adrian Holovaty
f69cf70ed8
MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00
Adrian Holovaty
5bb59acfde
Fixed #1632 -- Fixed typo in markup unit tests. Thanks, pb
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-04-13 13:16:05 +00:00
Adrian Holovaty
00b3891524
Fixed #1626 -- Fixed a bunch of typos in comments and docs. Thanks, Dexter
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2687 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-04-12 13:35:31 +00:00
Adrian Holovaty
85f084de39
Added model unit tests for get_DATEFIELD_list(). Refs #1423
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-03-01 03:12:24 +00:00
Adrian Holovaty
250281361d
Changed get_object() not to use 'ordering' parameter from the model. Thanks, Ned Batchelder. Also updated some unit tests to show correct DoesNotExist output
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-25 17:24:17 +00:00
Adrian Holovaty
f8915c0676
Removed a datetime test in tests/defaultfilters -- it was failing because it's hard to test datetime-related stuff
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-25 17:09:54 +00:00
Adrian Holovaty
9a74e89ef0
Fixed #1385 -- Allowed timesince filter to accept datetime.date objects. Thanks, Matt
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-23 20:27:03 +00:00
Adrian Holovaty
e029c9f7f8
Added usage to unit-test OptionParser
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-18 20:08:20 +00:00
Adrian Holovaty
8f54a225a5
Fixed spaceless template-tag tests in trunk (from magic-removal [2030])
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-17 17:59:31 +00:00
Adrian Holovaty
8654a91e12
Improved doctests to normalize long integers in compared output
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-17 17:56:33 +00:00
Adrian Holovaty
0eaee6f5d4
Fixed #1067 and #276 -- Added a {% spaceless %} tag, available in all templates
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-15 01:51:30 +00:00
Adrian Holovaty
39639cfd22
Fixed #1176 -- Changed {% comment %} template tag not to generate a nodelist, so it's now possible to comment-out broken template tags. Thanks, Kieran Holland
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-15 00:48:23 +00:00
Adrian Holovaty
bbfc645337
Fixed #1181 -- get_in_bulk no longer fails on empty input. Also added unit tests. Thanks, akaihola
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-06 20:43:14 +00:00
Adrian Holovaty
1714e79796
Changed repr for MultiValueDict
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-04 17:09:26 +00:00
Adrian Holovaty
49874d54a2
Fixed httpwrappers unit tests to reflect MultiValueDict repr() change
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1812 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-01 18:43:09 +00:00
Adrian Holovaty
53aef92bf8
Fixed #1145 -- Added unit tests for default template filters and fixed two bugs in filters. Thanks, Luke Plant
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-01 18:37:33 +00:00
Adrian Holovaty
e296de5500
Changed resolve_variable to resolve integers and floats as integers and floats. Added ifequal unit tests. Refs #959
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-16 05:33:24 +00:00
Adrian Holovaty
63cf85b64d
Moved custom unit-test templatetag library into the unit test module itself, to fix errors when running the test module directly.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-09 04:29:20 +00:00
Adrian Holovaty
65c1a9f1c9
Added two more unit tests for #982 (which still pass under Python 2.4). Refs #982
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-05 03:37:23 +00:00
Adrian Holovaty
027f2a378a
Added unit tests for #982 , but they're passing for me on Python 2.4. Maybe the problem is Python 2.3? Refs #982
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-05 03:34:35 +00:00
Adrian Holovaty
e7e991e86b
Fixed #964 -- Added helpful error message if there's a problem in running the unit tests. Thanks, paolo.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-01 06:39:39 +00:00
Adrian Holovaty
fa9cbe5ea0
Added unit tests to confirm #452 . Refs #452 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-01 06:01:46 +00:00
Adrian Holovaty
9abc012003
Fixed bug in basic.py model unit tests caused by [1511] -- the special-case MySQL thing needs to be at the end of the tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-01 06:01:13 +00:00
Jacob Kaplan-Moss
c28daf2289
Fixed #757 : manually set AutoField values are now respected; also added unit test to verify the correct behavior. Thanks, cygnus.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-01 03:06:30 +00:00
Adrian Holovaty
9541d7a7c7
Fixed #251 -- Added OR support to queries, via the new 'complex' DB API keyword argument. Updated docs and added unit tests. Also removed old, undocumented '_or' parameter. Thanks, Hugo.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-30 06:14:05 +00:00
Adrian Holovaty
991bb61242
Fixed #736 -- Changed behavior of QueryDict items() to be more consistent, fixed mutability holes, gave MultiValueDict many more dictionary methods and added unit tests. Thanks, Kieran Holland. This is slightly backwards-incompatible if you happened to rely on the behavior of QueryDict.items(), which is highly unlikely.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-30 04:08:46 +00:00
Adrian Holovaty
3ede006fc9
Fixed #911 -- Made template system scoped to the parser instead of the template module. Also changed the way tags/filters are registered and added support for multiple arguments to {% load %} tag. Thanks, rjwittams. This is a backwards-incompatible change for people who've created custom template tags or filters. See http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges for upgrade instructions.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-26 22:46:31 +00:00
Adrian Holovaty
473eabc447
Negligible spacing change in tests/othertests/templates.py
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-25 01:54:17 +00:00
Adrian Holovaty
5d863f1fbd
Fixed #603 -- Added template debugging errors to pretty error-page output, if TEMPLATE_DEBUG setting is True. Also refactored FilterParser for a significant speed increase and changed the template_loader interface so that it returns information about the loader. Taken from new-admin. Thanks rjwittams and crew
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-23 23:10:17 +00:00
Adrian Holovaty
bedf10a98d
Fixed #598 -- Added {% include %} template tag. Added docs and unit tests. Thanks, rjwittams
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-22 05:44:04 +00:00
Adrian Holovaty
10ca90a2fd
Added unit tests to verify OneToOne deletion works
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-21 02:34:05 +00:00
Adrian Holovaty
db94402ea6
Added unit tests to verify #800 . Refs #800
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-21 02:33:46 +00:00
Adrian Holovaty
9347f748b0
Added an EmailField to the many_to_one API tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1315 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-20 22:40:46 +00:00
Adrian Holovaty
887ed3ad2c
Changed one_to_one unit test to use %r instead of %s in repr method
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-20 22:17:00 +00:00
Georg Bauer
3478fb51d6
fixed two failing i18n tests - they only failed when using ./runtests, now they work both ways. And template tests give tracebacks when they fail.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-17 15:55:04 +00:00
Adrian Holovaty
f6bf41e59a
Fixed #121 -- Django now quotes all names in SQL queries. Also added unit tests to confirm. Thanks, Robin Munn and Sune.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-14 01:44:35 +00:00
Adrian Holovaty
e3e37ed120
Fixed #724 -- Ensured get_next_by_FOO() and get_previous_by_FOO() methods don't skip or duplicate any records in the case of duplicate values. Thanks for reporting the bug, mattycakes@gmail.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-10 05:36:41 +00:00
Adrian Holovaty
28bce49e59
Added unit tests to disprove #724
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-10 00:03:53 +00:00
Adrian Holovaty
133e9e9639
Added unit tests to confirm #683 -- a new custom_columns model example
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1147 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-09 21:56:05 +00:00
Adrian Holovaty
2a149e29b8
Fixed dateformat unit test that was failing -- the test was incorrect.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1146 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-09 20:41:18 +00:00
Adrian Holovaty
ba87f474dc
Changed dateformat unit tests so that they use the en-us language. They were failing because they depended on the current user's LANGUAGE_CODE setting
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-09 20:36:23 +00:00
Jacob Kaplan-Moss
5cf8f68423
Merged i18n branch into the trunk! Fixes #65 , and perhaps some others. NB: this means that the i18n branch is now obsolete and will be made read-only.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-04 04:59:46 +00:00
Adrian Holovaty
3226127aa2
Added model unit tests for year, month and day lookup. Refs #659
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1033 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-01 00:40:32 +00:00
Adrian Holovaty
e0d2793b7b
Fixed #687 -- Fixed bug in floatformat template filter and added unit tests. Thanks, Sune
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-25 01:44:14 +00:00
Adrian Holovaty
17f62269c2
Fixed #479 -- Implemented time-zone formats in dateformat. Thanks, Sune
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-22 21:37:59 +00:00
Adrian Holovaty
f82e64c6b2
Fixed #681 -- get_in_bulk no longer assumes PK fields are called id. Also added unit tests to confirm. Thanks, Jeremy Dunck
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-22 21:18:53 +00:00
Adrian Holovaty
6ee014725e
Changed template unit test runner to use new template-loader framework from [870]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-14 22:28:38 +00:00
Adrian Holovaty
f71f854628
Fixed #626 -- Moved template modules to django.core.template package. django.core.template_loader is deprecated, in favor of django.core.template.loader.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-14 20:10:13 +00:00
Adrian Holovaty
b63abf0379
Fixed bug in tests/runtests.py -- some versions of MySQLdb require an argument to connection.autocommit()
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-08 20:56:34 +00:00
Jacob Kaplan-Moss
27b1f69d79
Fixed #295 - added {{{forloop.revcounter}}} and {{{forloop.revcounter0}}} variables to for loops. Also updated the docs and added unit tests to verify correct behavior. Thanks, Clint.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 23:34:29 +00:00
Adrian Holovaty
8a7189f38f
Fixed #501 -- Fixed block.super in multi-level templates, and added unit tests to confirm. Thanks for the patch, django@kieranholland.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 04:22:09 +00:00
Adrian Holovaty
fa8662a13f
Added unit test to confirm #558
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 05:00:29 +00:00
Adrian Holovaty
c05cce5c52
Fixed #556 -- ManyToManyField join tables no longer assume the primary keys of both associated tables are integers. Also added unit tests to confirm.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-25 18:29:59 +00:00
Adrian Holovaty
473306a658
Added unit test to one_to_one model that confirms #527
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-20 01:12:24 +00:00
Adrian Holovaty
09bd9d3ef6
Fixed #506 -- runtests.py now allows models to be tested individually. Thanks, Simon
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@646 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-19 01:18:04 +00:00
Adrian Holovaty
095305cb44
Fixed #486 -- Fixed bug in template filter parsing in edge cases, and added unit tests. Thanks, Simon
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-11 15:18:04 +00:00
Adrian Holovaty
95e8688d7f
Added unit test that confirms #404
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-02 20:37:24 +00:00
Adrian Holovaty
def5d10ffc
Fixed #365 -- Changed template.resolve_variable to resolve hard-coded strings. Thanks, davidschein
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@587 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-01 02:18:04 +00:00
Adrian Holovaty
d80ac5ac25
Fixed #256 and #334 -- Added {% ifequal %} template tag. Also, {% ifequal %} and {% ifnotequal %} now both accept an optional {% else %} clause. Unit tests included.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-29 21:11:41 +00:00
Adrian Holovaty
75b5372a8f
Tiny change to docstring in many_to_one_null model unit test
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@558 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-26 05:39:23 +00:00
Adrian Holovaty
286698e8e5
Removed 'this isn't yet supported' message from custom_pk unit test docstring -- it IS supported
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-26 05:37:26 +00:00
Adrian Holovaty
25264c8604
Fixed #122 -- BIG, BACKWARDS-INCOMPATIBLE CHANGE. Changed model syntax to use fieldname=FieldClass() syntax. See ModelSyntaxChangeInstructions for important information on how to change your models
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-25 22:51:30 +00:00
Adrian Holovaty
9180112f02
Added 'limit' and 'offset' unit tests, one of which fails in MySQL 3 (refs #350 )
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-19 21:35:02 +00:00
Adrian Holovaty
b5ed20434e
Added unit test that tests #323 -- currently fails for MySQL and passes for PostgreSQL
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-15 15:43:59 +00:00
Adrian Holovaty
8d8da826db
Changed timestamp and time typecasting to preserve microseconds. Added unit tests to test this behavior, and added a db_typecast unit test module. Refs #306 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-11 19:34:34 +00:00
Jacob Kaplan-Moss
6f4e6b4bcb
Changed markup tests to not fail if required modules are not installed
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@483 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-11 18:32:19 +00:00
Jacob Kaplan-Moss
8e2d275390
Fixed #241 -- added django.contrib.markup app with markup templatetags for Textile, ReST and Markdown
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 18:31:33 +00:00
Jacob Kaplan-Moss
f65350b197
Doctest now uses the ELLIPSIS option, which allows the one_to_one test to pass under sqlite. This fixes #238 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 18:10:38 +00:00
Jacob Kaplan-Moss
3a1ae2164b
Added a custom doctest OutputChecker that ignores differences between ints and longs in values returned from the database; refs #238
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 18:00:52 +00:00
Adrian Holovaty
151bf05850
Fixed #297 -- Added a '--settings' option to runtests.py
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@463 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 15:36:16 +00:00
Adrian Holovaty
63e1f3d39c
Added more tests to custom_pk unit-test model
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@461 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 05:04:27 +00:00
Adrian Holovaty
0660203afe
Added custom_pk unit tests, which fail because of #81
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@458 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 03:52:41 +00:00
Adrian Holovaty
991832d0c4
Fixed #154 -- Fixed constraint error when deleting an object with a many-to-many field
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 00:21:41 +00:00
Adrian Holovaty
fd579f24d7
Improved unit-test framework so that it handles database errors more elegantly
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-09 23:51:55 +00:00
Adrian Holovaty
270234d189
Added some extra examples to many_to_many unit test
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-09 22:56:43 +00:00
Adrian Holovaty
741109f440
Added some extra examples to many_to_many unit test
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-09 22:53:43 +00:00
Adrian Holovaty
d87ca56c63
Removed period from save_delete_hooks docstring -- it doesn't fit our style
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@438 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-09 14:33:30 +00:00
Adrian Holovaty
a90e9f43db
Companion checkin to [432]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-08 18:30:07 +00:00
Adrian Holovaty
b7e5121684
Fixed #280 -- Added _pre_delete() and _post_delete() hooks. Also updated the docs and added a unit testdjango/core/meta/__init__.py
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-08 18:29:02 +00:00
Adrian Holovaty
7dc07ed937
Fixed typo in one_to_one test docstring. Thanks, Frank
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-04 02:35:26 +00:00
Jacob Kaplan-Moss
a9331211c8
Modified custom_methods test to use date() instead of datetime()
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-01 21:32:45 +00:00
Jacob Kaplan-Moss
c73f4cd486
Removed tests/builddocs in favor of integrating it into the documentation builder for the site in general
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-01 19:42:36 +00:00
Jacob Kaplan-Moss
440a2a97e9
Added framework for writing non-model-based tests, and added tests for cache and templates
...
from the old django/tests location (which has been removed).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@367 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-01 19:09:07 +00:00
Adrian Holovaty
a4438d74f6
Changed custom_methods model test/doc to add explanation of what Article(*row) means, for Python beginners
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-01 18:57:37 +00:00
Adrian Holovaty
b307fb09bb
Fixed #239 and #107 -- Changed model init() to use Field.get_default() if the value wasn't explicitly passed as a keyword argument. That means setting 'id=None' is no longer necessary, and you can leave off fields if you want them to have default values set.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@360 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-01 16:26:39 +00:00
Adrian Holovaty
1a8fc57bf6
Fixed #214 -- Added get_values() and get_values_iterator() module-level functions to DB API. Thanks, rmunn
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-01 15:32:42 +00:00
Adrian Holovaty
3aa33edeef
Small formatting improvement to one_to_one model test
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-01 15:31:50 +00:00
Adrian Holovaty
2f04115694
Added m2o_recursive and m2o_recursive2 model unit tests/examples
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-31 01:23:47 +00:00
Adrian Holovaty
04544c97b9
Added one_to_one model unit test/example
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-31 00:20:56 +00:00
Adrian Holovaty
716d00a314
Small formatting tweak to generated model examples
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 23:42:15 +00:00
Adrian Holovaty
b7643d009e
Added 'API reference' section to generated model examples
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 23:41:05 +00:00
Adrian Holovaty
7b6c472167
Changed tests.builddocs to handle ReST double-backquotes (albeit naively)
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 23:15:50 +00:00
Adrian Holovaty
b3e8b20b3e
Changed template in tests.builddocs
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 22:51:25 +00:00
Adrian Holovaty
5002b44f28
Added tests.builddocs, which builds HTML documentation by introspecting the model unit tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 22:35:54 +00:00
Adrian Holovaty
5bfab1e1b2
Small addition to m2m_intermediary model test
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 20:43:04 +00:00
Adrian Holovaty
33d5006cc7
Added m2m_intermediary model unit test/example
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@344 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 20:30:10 +00:00
Adrian Holovaty
6451118946
Added equality test to 'basic' model unit test
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 20:29:59 +00:00
Adrian Holovaty
a47794c824
Changed model test framework to use meta.get_app() instead of a manual import
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 20:25:02 +00:00
Jacob Kaplan-Moss
f6e75ab3cf
Added support for sqlite backend to test framework
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 19:22:50 +00:00
Adrian Holovaty
85d2b12bdf
Added two more model test modules -- get_latest and lookup
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@339 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 16:20:39 +00:00
Adrian Holovaty
daf8467b37
Added first stab at model and DB-API unit tests
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 15:15:40 +00:00