Commit Graph

289 Commits

Author SHA1 Message Date
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