1
0
mirror of https://github.com/django/django.git synced 2025-03-04 22:24:29 +00:00

4040 Commits

Author SHA1 Message Date
Preston Timmons
612ef3e5c9 Modified utils_tests for unittest2 discovery. 2013-04-12 15:31:58 -06:00
Preston Timmons
3810dc3070 Modified template_tests for unittest2 discovery. 2013-04-12 15:13:59 -06:00
Preston Timmons
44293c5c05 Modified model_fields for unittest2 discovery. 2013-04-12 15:11:12 -06:00
Preston Timmons
3ca3d2206c Modified generic_views for unittest2 discovery. 2013-04-12 15:10:04 -06:00
Preston Timmons
5e84abec14 Modified comment_tests for unittest2 discovery. 2013-04-12 15:07:24 -06:00
Preston Timmons
6f3e139739 Modified test_client_override to work with unittest2 discovery. 2013-04-12 15:05:34 -06:00
Preston Timmons
751b007c98 Modified test_utils to work with unittest2 discovery. 2013-04-12 15:00:48 -06:00
Preston Timmons
cdf520ee86 Modified forms_tests to work with unittest2 discovery. 2013-04-12 15:00:17 -06:00
Claude Paroz
b04fd579d5 Fixed #20237 (again) Allowed binary parameter to assertContains 2013-04-12 20:12:42 +02:00
Baptiste Mispelon
ab686022f8 Fixed #20211: Document backwards-incompatible change in BoundField.label_tag
Also cleaned up label escaping and consolidated the test suite regarding
label_tag.
2013-04-12 10:17:17 +02:00
Claude Paroz
fe01404bb9 Fixed #20237 -- Reenabled assertContains with binary parameter
Thanks Baptiste Mispelon for the review.
2013-04-11 10:38:24 +02:00
Baptiste Mispelon
e7b9c11c3f Fixed #20231 -- Don't use allow_lazy on smart_split 2013-04-10 13:05:29 +02:00
Claude Paroz
118faa0893 Made usage of assertTemplateUsed in admin_views tests
Thanks Baptiste Mispelon for the suggestion.
2013-04-10 10:16:15 +02:00
Baptiste Mispelon
f69396665c Fix admin_views tests after commit 3be368c73e. 2013-04-08 22:02:18 +02:00
Tobias McNulty
161c4da588 Fixed #14019 -- Initialize SQLInsertCompiler.return_id attribute. 2013-04-08 13:41:36 -06:00
Baptiste Mispelon
f9dc1379b8 Fix #15126: Better error message when passing invalid options to ModelForm.Meta. 2013-04-07 19:08:53 +02:00
Simon Charette
216580e034 Fixed #20207 -- Handle ManyToManyField with a unicode name correctly. 2013-04-05 15:09:53 -04:00
Baptiste Mispelon
c250f9c99b Fixed #20038 -- Better error message for host validation. 2013-04-03 14:27:20 -06:00
Preston Timmons
8ce46375ae Move last remaining tests out of models.py files; prep for test discovery. 2013-04-02 19:00:55 -06:00
Claude Paroz
edc782b7b5 Relaxed time frame check in test_strip_tags 2013-04-01 22:53:04 +02:00
Julien Phalip
2f81a0ca65 Fixed #20169 -- Ensured that the WSGI request's path is correctly based on the SCRIPT_NAME environment parameter or the FORCE_SCRIPT_NAME setting, regardless of whether or not those have a trailing slash. Thanks to bmispelon for the review. 2013-04-01 12:04:44 -07:00
Claude Paroz
8c41bd93c2 Fixed #16737 -- Support non-ascii column names in inspectdb
Thanks moof at metamoof.net for the report.
2013-04-01 19:59:57 +02:00
Claude Paroz
2817a29d90 Imported unittest from django.utils in util_tests
Without this, the 'new' assertion methods are not present with
Python 2.6.
2013-04-01 19:59:57 +02:00
Claude Paroz
dcf563071f Fixed #5014 -- Guessed max_digits and decimal_places for SQLite
Decimal is treated as float on SQLite, hence inspectdb can only
guess max_digits and decimal_places arguments.
2013-04-01 18:32:57 +02:00
Claude Paroz
51028f50b6 Fixed getting max_digits for MySQL decimal fields
Refs #5014.
2013-04-01 18:17:00 +02:00
Claude Paroz
a01361b5ae Added more tests for strip_tags utility
Refs #19237.
2013-04-01 16:48:47 +02:00
Claude Paroz
b474ffe63a Fixed #20172 -- Ensured urlize supports IPv4/IPv6 addresses
Thanks Marc Aymerich for the report and the initial patch.
2013-04-01 15:37:37 +02:00
Joe Friedl
2d0db67813 Fixed #20167 -- Preserve the traceback of ImportErrors in import_by_path.
Thanks @carljm for the review.
2013-03-31 23:00:06 -04:00
Claude Paroz
3ff3212713 Fixed #19220 -- Prevented decimals to be displayed in scientific notation
Thanks nebstrebor for the report and antofik for the patch.
2013-03-31 22:39:01 +02:00
Baptiste Mispelon
5080311998 Fixed #20130 -- Regression in {% cache %} template tag. 2013-03-30 12:13:08 +01:00
Christoph Sieghart
465b01f065 Fixed #19998 -- Fixed --ignorenonexistent support for XML based fixtures. 2013-03-30 11:59:50 +01:00
Baptiste Mispelon
a40746b1cb Fix #20158: invalid code in queryset_pickle test models. 2013-03-29 13:32:21 +01:00
Claude Paroz
86b1c31689 Fixed #19954 -- Fixed MySQL _last_executed decoding
Queries can contain binary data undecodable with utf-8. In this
case, using the 'replace' errors mode when decoding seems like
an acceptable representation of the query.
Thanks Marcel Ryser for the report.
2013-03-28 20:08:37 +01:00
Jacob Kaplan-Moss
4befef91f1 Correctly restore warning capture after logging tests.
This is a fix to the wrong behavior that 15c3906eeb introduced.
2013-03-27 17:01:11 -05:00
Jacob Kaplan-Moss
654d8e96ae Fixed logging-related test failure introduced by e79b857. 2013-03-27 12:05:31 -05:00
Jacob Kaplan-Moss
f6989e559c Merge remote-tracking branch 'ptone/18985-fix' 2013-03-27 10:34:28 -05:00
Claude Paroz
34a50e99e8 Added regression test for custom SQL containing percents
Refs #3485.
2013-03-26 23:19:32 +01:00
Anssi Kääriäinen
e17fa9e877 Fixed #20091 -- Oracle null promotion for empty strings 2013-03-26 14:19:54 +02:00
Adam Wentz
a4b8a4b632 Fixed #20121 -- Removed LogEntry.get_admin_url's hard-coded path.
Updated LogEntry.get_admin_url to use 'reverse' instead
of a hard-coded path.
2013-03-25 23:45:27 -04:00
Claude Paroz
066bf42675 Removed forced typecasting of help_text/label Field arguments
In any case, setting those variables to non-ascii utf-8 bytestrings
is now considered a programming error.
2013-03-25 21:38:21 +01:00
Preston Holmes
e79b857a07 Fixed #18985 -- ensure module level deprecations are displayed
Also don't compete with -W CLI option.

Thanks to Aymeric Augustin for the catch, and Claude Paroz for the patch.
2013-03-24 22:06:02 -07:00
Loic Bistuer
521765f63d Fixed #19541 -- Fixed BaseHandler to enable reversing URLs in response middlewares
and streamed responses with respect to per-request urlconf.
2013-03-25 03:19:19 +07:00
Anssi Kääriäinen
266de5f9ae Fixed 19385 -- Added ORM support for multicolumn joins
This patch iproved two major parts in Django. First, the fields.related
was refactored. The main addition there was ForeignObject. Second, the
ORM now handles multicolumn joins in most cases, though there are still
cases that do not work correcly (split_exclude() for example).

In addition there were extesive changes to how GenericRelation works.
Before it was a fake m2m field, now it is a pure virtual fields and is
based on ForeignObject.

There is still much room for improvement. The related fields code is
still somewhat confusing, and how fields are represented in model._meta
should also be revisited.

This patch was written mostly by Jeremy Tillman with some final polish
by the committer.
2013-03-24 18:08:01 +02:00
Aymeric Augustin
bc35b95274 Fixed test failures introduced in e16c48e001. 2013-03-24 15:27:50 +01:00
Aymeric Augustin
e16c48e001 Fixed #15124 -- Changed the default for BooleanField.
Thanks to the many contributors who updated and improved the patch over
the life of this ticket.
2013-03-24 13:47:01 +01:00
Claude Paroz
76aecfbc4b Fixed #9055 -- Standardized behaviour of parameter escaping in db cursors
Previously, depending on the database backend or the cursor type,
you'd need to double the percent signs in the query before passing
it to cursor.execute. Now cursor.execute consistently need percent
doubling whenever params argument is not None (placeholder substitution
will happen).
Thanks Thomas Güttler for the report and Walter Doekes for his work
on the patch.
2013-03-23 17:11:10 +01:00
Claude Paroz
164528acc8 Fixed #20108 -- Fixed filepath_to_uri decoding error
This was a regression due to unicode_literals usage. Thanks Ivan
Virabyan for the report and the initial patch.
2013-03-22 17:55:12 +01:00
Marc Tamlyn
829dc3c5a6 Fixed #20094 - Be more careful when checking for Iterator
Python 2.6 has some different behaviour when checking
isinstance(foo, collections.Iterator).
2013-03-22 17:31:29 +01:00
Andrew Gorcester
f9ab543720 Fixed #20084 -- Provided option to validate formset max_num on server.
This is provided as a new "validate_max" formset_factory option defaulting to
False, since the non-validating behavior of max_num is longstanding, and there
is certainly code relying on it. (In fact, even the Django admin relies on it
for the case where there are more existing inlines than the given max_num). It
may be that at some point we want to deprecate validate_max=False and
eventually remove the option, but this commit takes no steps in that direction.

This also fixes the DoS-prevention absolute_max enforcement so that it causes a
form validation error rather than an IndexError, and ensures that absolute_max
is always 1000 more than max_num, to prevent surprising changes in behavior
with max_num close to absolute_max.

Lastly, this commit fixes the previous inconsistency between a regular formset
and a model formset in the precedence of max_num and initial data. Previously
in a regular formset, if the provided initial data was longer than max_num, it
was truncated; in a model formset, all initial forms would be displayed
regardless of max_num. Now regular formsets are the same as model formsets; all
initial forms are displayed, even if more than max_num. (But if validate_max is
True, submitting these forms will result in a "too many forms" validation
error!) This combination of behaviors was chosen to keep the max_num validation
simple and consistent, and avoid silent data loss due to truncation of initial
data.

Thanks to Preston for discussion of the design choices.
2013-03-21 01:27:24 -07:00
Carny Cheng
aaec4f2bd8 Fixed #18839 - Field.__init__() now calls super(). 2013-03-20 16:20:57 -07:00