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