Anssi Kääriäinen
c9a96075fa
Fixed #20378 -- regression in GenericRelation on abstract model
...
When a GenericRelation was defined on abstract model, queries on childs
of the abstract model didn't work. The problem was in the way fields and
in particular field.rel was copied from models to their children.
The regression was likely caused by #19385 . Thanks to Gavin Wahl for
spotting the regression.
2013-05-20 18:02:10 +03:00
Anssi Kääriäinen
f53059b411
Fixed qs.values() regression when used in subquery
2013-05-20 15:38:47 +03:00
Marc Tamlyn
6d81d5d82e
Merge pull request #1181 from aaugustin/better-api-to-disable-atomic-requests
...
Changed API to disable ATOMIC_REQUESTS per view.
2013-05-20 00:26:06 -07:00
Carl Meyer
a7dc13ec23
Fixed #20437 - marked a test-runner test as expected-fail under certain conditions.
2013-05-20 01:56:23 -04:00
Tomasz Jaskowski
022de7e139
Fixed #20449 - Corrected test sensitivity to current working dir.
2013-05-19 23:58:06 -04:00
Alex Gaynor
7c56212c71
Lower the max length for a test field so that it works on MySQL.
2013-05-19 13:58:58 -07:00
Anssi Kääriäinen
190771d003
Fixed fixtures testing failure
...
The failure was caused by generating the same warning from two tests.
The second time the same warning was raised it was swallowed by the
"once" simplefilter of warnings.
2013-05-19 20:53:49 +03:00
Aymeric Augustin
6633eeb886
Changed API to disable ATOMIC_REQUESTS per view.
...
A decorator is easier to apply to CBVs. Backwards compatibility isn't an
issue here, except for people running on a recent clone of master.
Fixed a few minor problems in the transactions docs while I was there.
2013-05-19 19:53:16 +02:00
Preston Holmes
6786920fd8
Fixed #16330 -- added --pks option in dumpdata command
...
Thanks to guettli for the initial ticket and patch, with additional work
from mehmetakyuz and Kevin Brolly.
2013-05-19 09:10:40 -07:00
Bozidar Benko
2d309a7043
Fixed #15961 -- Modified ModelAdmin to allow for custom search methods.
...
This adds a get_search_results method that users can override to
provide custom search strategies.
Thanks to Daniele Procida for help with the docs.
2013-05-19 16:45:00 +02:00
Aymeric Augustin
b06f6c1618
Fixed test failure introduced in 1927bf7c91
.
2013-05-19 16:23:14 +02:00
Pablo Recio
65f9e0affd
Fixes #18896 . Add tests verifying that you can get IntegrityErrors using get_or_create through relations like M2M, and it also adds a note into the documentation warning about it
2013-05-19 14:16:12 +02:00
Aymeric Augustin
d34b1c29e2
Merge pull request #1161 from erikr/urlize-additional-test
...
Fixed #19070 -- Additional test for urlize and brackets
2013-05-19 04:59:15 -07:00
Aymeric Augustin
f7467181aa
Merge pull request #1160 from erikr/host-inet-postgres2
...
Fixed #11442 -- Postgresql backend casts all inet types to text
2013-05-19 04:57:10 -07:00
Erik Romijn
1927bf7c91
Fix #19070 -- Additional test for urlize and brackets
2013-05-19 13:39:21 +02:00
Erik Romijn
60d94c2a80
Fixed #11442 -- Postgresql backend casts all inet types to text
2013-05-19 13:28:09 +02:00
Łukasz Langa
660762681c
Fixed #20126 -- XViewMiddleware moved to django.contrib.admindocs.middleware
2013-05-19 13:18:35 +02:00
Aymeric Augustin
cb86f707a0
Fixed #12747 -- Made reason phrases customizable.
2013-05-19 13:14:54 +02:00
Aymeric Augustin
3129d19071
Merge pull request #1152 from ambv/issue11915
...
Fixed #11915 : generic Accept-Language matches country-specific variants
2013-05-19 04:01:20 -07:00
Andrew Godwin
04e0fc029f
Merge pull request #1094 from senko/ticket_11160
...
Fixed #11160 : Formset non_form_errors returns ErrorList() if is_valid is not called
2013-05-19 03:56:14 -07:00
Andrew Godwin
7a99d1e167
Merge pull request #1134 from senko/ticket_18990
...
Fixed #18990 : Loaddata now complains if fixture doesn't exist
2013-05-19 03:54:29 -07:00
Łukasz Langa
26e3e7ecb5
Fixed #11915 : generic Accept-Language matches country-specific variants
2013-05-19 12:50:09 +02:00
Senko Rasic
65c557115f
fix warnings imports in fixtures tests
2013-05-19 12:49:03 +02:00
Honza Kral
4ad1eb1c14
Fixed #12674 -- provide a way to override admin validation
...
Moved admin validation code to classes and have those be class
attributes to the ModelAdmin classes.
2013-05-19 12:42:52 +02:00
Andrew Godwin
264f8650e3
ModelState now freezes options and bases
2013-05-19 12:35:17 +02:00
Łukasz Langa
e80636b668
Added TransRealMixin to fix i18n global state pollution in the test suite
2013-05-19 12:05:57 +02:00
Senko Rasic
c44a2c40fe
Fixed #18990 -- Loaddata now complains if fixture doesn't exist
...
If the fixture doesn't exist, loaddata will output a warning.
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the warning is not emitted. This allows syncdb and
flush management commands to attempt to load it without causing
spurious warnings.
Thanks to Derega, ptone, dirigeant and d1ffuz0r for contributions
to the ticket.
2013-05-19 11:31:27 +02:00
Senko Rasic
cc3b3ba93a
Fixed #18990 : Loaddata now complains if fixture doesn't exist
...
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the error is not raised. This allows syncdb and
flush management commands to attempt to load it without causing
an error if it doesn't exist.
2013-05-19 10:56:09 +02:00
Andrea Crotti
5124ab7620
add comment to explain why it's necessary to do an explicit check for
...
Python2 and how metaclasses are defined
2013-05-19 10:36:04 +02:00
Marc Tamlyn
c70ca4879e
Merge pull request #1116 from elektrrrus/ticket_20234_20236
...
Ticket 20234 20236
2013-05-19 01:32:41 -07:00
Emil Stenström
7d77e9786a
Fixed #20246 -- Added non-breaking spaces between values an units
2013-05-18 23:01:48 +02:00
Tome Cvitan
caf56ad174
Fixed #20440 -- Ensured CharField's max_length/min_length are integers
2013-05-18 22:30:24 +02:00
Karol Sikora
3eba8c7f7f
Fixed #20234 and #20236 -- SingleObjectMixin fixes
...
Added object on SingleObjectMixin returned context,
some code clanup.
2013-05-18 21:13:27 +02:00
Aymeric Augustin
0038296135
Fixed ff881aef
on Python 3.
2013-05-18 20:48:47 +02:00
Andrew Godwin
38a8cf1cdc
Fix state tests a little
2013-05-18 18:30:34 +02:00
Shai Berger
ff881aef53
Fixed #13958 -- problem reporting exception from \r-line-ended file
...
Thanks petrvanblokland for reporting and saz for the patch
2013-05-18 19:30:03 +03:00
Łukasz Langa
f763227c7d
Fixes a Python 3.x regression introduced in a19e9d80
2013-05-18 18:06:31 +02:00
Florian Apolloner
dc8814bf7d
Merge branch 'master' of github.com:django/django
2013-05-18 17:39:14 +02:00
Łukasz Langa
bd97f7d0cb
Fixed #15201 : Marked CACHE_MIDDLEWARE_ANONYMOUS_ONLY as deprecated
2013-05-18 17:38:32 +02:00
Florian Apolloner
acd0bb39df
Fixed #14894 -- Ensure that activating a translation doesn't run into threading issues.
...
Thanks to maxbublis for the report and sergeykolosov for the patch.
2013-05-18 17:36:31 +02:00
Donald Stufft
398841d6d3
Merge branch 'allow-any-iterable-for-choices'
2013-05-18 11:31:16 -04:00
Donald Stufft
a19e9d80ff
Fixed #20430 - Enable iterable of iterables for model choices
...
Allows for any iterable, not just lists or tuples, to be used as
the inner item for a list of choices in a model.
2013-05-18 11:14:05 -04:00
Aymeric Augustin
e73cb6391d
Merge pull request #1122 from ambv/issue13285
...
Fixed #13285 : populate_xheaders breaks caching
2013-05-18 08:05:48 -07:00
Łukasz Langa
64e11a68f1
Fixed #13285 : populate_xheaders breaks caching
2013-05-18 17:03:43 +02:00
Aymeric Augustin
3634948c88
Moved IgnorePendingDeprecationWarningsMixin in django.test.utils.
...
This mixin is useful whenever deprecating a large part of Django.
2013-05-18 16:49:15 +02:00
Olivier Sels
63a9555d57
Fixed #19436 -- Don't log warnings in ensure_csrf_cookie.
2013-05-18 16:17:46 +02:00
Aymeric Augustin
7d050e8e9c
Merge pull request #1113 from denibertovic/master
...
Fixed #18761 -- Added whitespace stripping to URLField and SlugField.
2013-05-18 07:11:11 -07:00
Deni Bertovic
186ec21a3d
Added stripping of whitespace for SlugField and URLField
2013-05-18 16:06:08 +02:00
Jacob Burch
89955cc35f
Fixed #9595 -- Allow non-expiring cache timeouts.
...
Also, streamline the use of 0 and None between cache backends.
2013-05-18 15:39:42 +02:00
Łukasz Langa
92ebb29c53
Fixes #19919 : get_language_from_request() disregards "en-us" and "en" languages
...
when matching Accept-Language
2013-05-18 14:37:04 +02:00
Florian Apolloner
16683f29ea
Merge pull request #1084 from erikr/master
...
Fixed #13546 -- Easier handling of localize field options in ModelForm
2013-05-18 05:15:15 -07:00
Marc Tamlyn
ef73a8eefd
Merge pull request #1083 from Markush2010/ticket20235
...
Fixes #20235 - MultipleObjectMixin requires object_list in kwargs
2013-05-18 05:14:28 -07:00
Erik Romijn
756b81dbd1
Fixed #13546 -- Easier handling of localize field options in ModelForm
2013-05-18 14:13:00 +02:00
Matthew Somerville
1c921cfac3
Fixed #20235 -- Use self.object_list if object_list not present in get_context_data kwargs.
...
This is so MultipleObjectMixin can be used in the same way as
SingleObjectMixin.
2013-05-18 14:10:40 +02:00
Andrew Godwin
7d041b9394
Split up test and make the State classes a bit better.
2013-05-18 13:49:56 +02:00
Andrew Godwin
028bbd15ca
Add a deconstruct() method to Fields.
...
This allows the field's initial argument to be obtained so it can be
serialised to, and re-created from, a textual format.
2013-05-18 13:48:57 +02:00
Senko Rasic
493aca453a
Fixed #11160 - Ensure full_clean is called from non_form_errors
...
Updated FormSet.non_form_errors() to ensure full_clean() has
been called before returning the errors.
2013-05-18 13:44:27 +02:00
Aymeric Augustin
4bed64c417
Made test introduced in 566e284c
pass on Python 3.
2013-05-18 13:34:52 +02:00
Senko Rasic
566e284c56
Added test for multipart, non form-data POST.
...
Closes #9054 . The bug itself is no longer present.
2013-05-18 12:50:28 +02:00
Claude Paroz
8fd44b2551
Fixed #20356 -- Prevented crash when HTTP_REFERER contains non-ascii
...
Thanks srusskih for the report and Aymeric Augustin for the review.
2013-05-18 12:39:11 +02:00
Florian Apolloner
051cb1f4c6
Fixed #20411 -- Don't let invalid referers blow up CSRF same origin checks.
...
Thanks to edevil for the report and saz for the patch.
2013-05-18 12:32:47 +02:00
Andrew Godwin
331546f6ee
More conversion to a ContextManager schema_editor
2013-05-18 11:48:46 +02:00
Baptiste Mispelon
9012a9e200
Fixed #20422 -- Applied makemessage's --ignore patterns to full path
...
Fix makemessage's --ignore patterns being applied to the full path
instead of the file name. Thanks to nnseva for the report and the
original patch.
2013-05-18 10:40:16 +02:00
Andrew Godwin
b31eea069c
Merge branch 'master' into schema-alteration
2013-05-18 10:21:31 +02:00
Shai Berger
9ef4d177d1
Fixed #20388 -- Test failures under Oracle.
...
Add "FROM DUAL" to SQL selecting constants in tests for Oracle.
2013-05-16 15:00:16 +02:00
Daniel Lindsley
33793f7c3e
Fixed #19934 - Use of Pillow is now preferred over PIL.
...
This starts the deprecation period for PIL (support to end in 1.8).
2013-05-14 19:32:04 -07:00
Florian Apolloner
e23a5f9a47
Fixed a regression in the test runner loading of runtests.py.
...
Refs #17365 , #17366 , #18727 .
2013-05-11 15:47:40 +02:00
Carl Meyer
9012833af8
Fixed #17365 , #17366 , #18727 -- Switched to discovery test runner.
...
Thanks to Preston Timmons for the bulk of the work on the patch, especially
updating Django's own test suite to comply with the requirements of the new
runner. Thanks also to Jannis Leidel and Mahdi Yusuf for earlier work on the
patch and the discovery runner.
Refs #11077 , #17032 , and #18670 .
2013-05-10 23:08:45 -04:00
Anssi Kääriäinen
c0d8932a6d
Fixed #19939 -- generic relations + split_exclude regression
...
Added a test, the issue was already fixed (likely by the patch
for #19385 ).
2013-05-11 03:48:58 +03:00
Alex Gaynor
327e362ff3
Fixed an obvious typo.
2013-05-10 08:56:39 -07:00
Andrew Godwin
eb5e50215a
Do some basic testing of the recorder
2013-05-10 16:18:19 +01:00
Andrew Godwin
8a1f017777
Add root_node and leaf_node functions to MigrationGraph
2013-05-10 16:09:57 +01:00
Andrew Godwin
9ce8354672
First phase of loading migrations from disk
2013-05-10 16:00:55 +01:00
Aymeric Augustin
a4dec43b52
Fixed two admin_views tests under Oracle.
...
Thanks Anssi for the review.
2013-05-10 16:56:42 +02:00
Andrew Godwin
cb4b0de49e
Merge branch 'master' into schema-alteration
2013-05-10 12:55:30 +01:00
Andrew Godwin
f6801a234f
Adding a dependency graph class and tests
2013-05-10 12:52:04 +01:00
Aymeric Augustin
9a3708cec8
Fixed a test that fails under Python 3.
2013-05-09 19:33:02 +02:00
Luke Plant
f026a519ae
Fixed #19733 - deprecated ModelForms without 'fields' or 'exclude', and added '__all__' shortcut
...
This also updates all dependent functionality, including modelform_factory
and modelformset_factory, and the generic views `ModelFormMixin`,
`CreateView` and `UpdateView` which gain a new `fields` attribute.
2013-05-09 16:44:36 +01:00
Luke Plant
1e37cb37ce
Further removal of static admin validation that can fail erroneously
2013-05-09 16:44:36 +01:00
Andrew Godwin
75bf394d86
Rest of the _meta.app_cache stuff. Schema tests work now.
2013-05-09 15:59:26 +01:00
Andrew Godwin
104ad0504b
Split out a BaseAppCache, make AppCache borg again, add _meta.app_cache
2013-05-09 15:16:43 +01:00
Alex Gaynor
6634cb7b53
Removed a test that didn't make sense; code could never be called the way the test was written.
2013-05-09 06:55:25 -07:00
Luke Plant
2f8f2ad1d7
Removed some failing tests missed in 1556b1c3b7
2013-05-09 01:45:34 +01:00
Luke Plant
1556b1c3b7
Removed fragile admin validation of fields on ModelForm
...
Refs #19445
2013-05-09 00:49:05 +01:00
Aymeric Augustin
832b4a5722
Marked a test as an expected failure on MySQL and Python 3.2.
...
This test hits a bug in current ports of MySQLdb.
2013-05-08 23:12:46 +02:00
Aymeric Augustin
7476d96f83
Marked tests of BinaryFields as expected failures on MySQL and Python 3.
...
Current ports of MySQLdb are very buggy in this area.
2013-05-08 15:48:39 +02:00
Tai Lee
99a6f0e77c
Fixed #20354 -- `makemessages` no longer crashes with `UnicodeDecodeError`
...
Handle the `UnicodeDecodeError` exception, send a warning to `stdout` with the
file name and location, and continue processing other files.
2013-05-07 21:22:05 +02:00
Florian Apolloner
da85c8cf32
Fixed a regression introduced in 9f7a01ef2b
.
2013-05-05 15:27:14 +02:00
Florian Apolloner
780fa48f5f
Fixed test failures introduced in a5becad909
.
2013-05-01 16:40:49 +02:00
Aymeric Augustin
3a4276ffc3
Tested that get_or_create raises IntegrityError.
...
It used to raise "DatabaseError: no such savepoint" with the old
transaction management. Closes #15117 .
2013-04-28 17:15:41 +02:00
Aymeric Augustin
90fe9141de
Fixed #18986 -- Improved error message for missing files
...
in CachedStaticFilesStorage. Thanks zyegfryed for his work on the patch.
2013-04-28 16:45:05 +02:00
Claude Paroz
4769db6b5f
Fixed #20321 -- Added missing key name in MergeDict KeyError message
...
Thanks mark.harviston et gmail.com for the report.
2013-04-26 08:59:34 +02:00
Marti Raudsepp
172b50b722
Clearer explanation when exception has no message
...
"No exception supplied" is misleading; actually there is an exception,
but there's no message string.
2013-04-23 21:18:17 +03:00
Alex Gaynor
714161c864
Fix != operations on lazy objects.
2013-04-19 10:58:29 -07:00
Anton Baklanov
59d127e45f
Fixed #20276 -- Implemented __bool__ for MergeDict
...
MergeDict evaluates now to False if all contained dicts are empty.
Thanks til for the report and the initial patch.
2013-04-19 10:08:16 +02:00
Andrew Godwin
6e21a59402
Fix schema editor interaction with new transactions
2013-04-19 09:01:45 +01:00
Andrew Godwin
7f3678dc4c
Merge branch 'master' into schema-alteration
...
Conflicts:
django/db/backends/__init__.py
django/db/backends/mysql/base.py
django/db/backends/oracle/base.py
django/db/backends/oracle/creation.py
django/db/backends/postgresql_psycopg2/base.py
django/db/backends/sqlite3/base.py
django/db/models/fields/related.py
2013-04-18 17:16:39 +01:00
Carl Meyer
a98465c040
Refs #14567 -- Fixed failing test that wasn't being run.
2013-04-16 13:34:06 -06:00
Matthew Tretter
a506b6981b
Fixed #18231 -- Made JavaScript i18n not pollute global JS namespace.
...
Also, use Django templating for the dynamic generated JS code and use
more idiomatic coding techniques.
Thanks Matthew Tretter for the report and the patch.
2013-04-14 17:45:01 -03:00
Claude Paroz
be9ae693c4
Fixed #17840 -- Generalized named placeholders in form error messages
...
Also fixed plural messages for DecimalField.
2013-04-13 18:55:50 +02:00
Baptiste Mispelon
9ac4dbd7b5
Fixed #4592 : Made CheckboxSelectMultiple more like RadioSelect
...
I refactored RadioSelect and CheckboxSelectMultiple to
make them inherit from a base class, allowing them to share
the behavior of being able to iterate over their subwidgets.
Thanks to Matt McClanahan for the initial patch and to
Claude Paroz for the review.
2013-04-13 16:37:27 +02:00
Baptiste Mispelon
c4186c2fec
Fixed #4117 : Apply id attribute to the outer <ul> of RadioSelect
2013-04-13 12:23:25 +02:00
Claude Paroz
f56b703b27
Used a Python 3 compatible StringIO in test_utils
2013-04-13 11:38:13 +02:00
Baptiste Mispelon
844fbc85c1
Fixed #19874 : Apply id attribute to the outer <ul> of CheckboxSelectMultiple
2013-04-13 11:09:47 +02:00
Claude Paroz
3f05c70be0
Updated a renamed test file
2013-04-13 11:09:47 +02:00
Preston Timmons
6d96831769
Fixed template_tests so discovery doesn't directly find tests that require setuptools.
2013-04-12 15:42:58 -06:00
Preston Timmons
56e777eba3
Modified view_tests for unittest2 discovery.
2013-04-12 15:42:07 -06:00
Preston Timmons
e8446be560
Modified validation to work with unittest2 discovery.
2013-04-12 15:33:22 -06:00
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 `ImportError`s 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
Matthew Wood
a7960bcb35
Fixed #18972 -- Refactored bundled wsgi server's chunking algorithm.
...
Thanks to amosonn at yahoo.com for the report, @doda for the initial patch and
@datagrok for the revamped logic and test case.
2013-03-20 18:46:26 -04:00
Anssi Kääriäinen
80e68ee2ff
Added tests for already fixed #20101
...
The ticket dealt with a case where one query had .exclude() that
produced a subquery, the other query had a join to the same model that
was subqueried in the first query. This was already fixed in master, so
only test added.
2013-03-21 00:43:26 +02:00
Claude Paroz
23490a2394
Revert "Fixed 19895 -- Made second iteration over invalid queryset raise an exception too"
...
This reverts commit 2cd0edaa47
.
This commit was the cause of a memory leak. See ticket for more details.
Thanks Anssi Kääriäinen for identifying the source of the bug.
2013-03-20 10:41:53 +01:00
Paul Collins
9a85ad89c2
Fixed #16319 -- added SuccessMessageMixin to contrib.messages
...
Thanks martinogden for the initial patch and d1ffuz0r for tests.
2013-03-19 21:02:55 -07:00
Simon Charette
5938e7013e
Fixed a python 3.2 syntax error and python 3 warning introduced by 054ce2aa02
.
2013-03-19 22:16:48 -04:00
konarkmodi
483e1b807e
Refs #18586 -- Split out long custom_columns lookup test into multiple tests.
2013-03-19 15:58:54 -07:00
Juan Catalano
054ce2aa02
Fixed #20088 -- Changed get_admin_log not to depend on User id field
...
Before this change, the get_admin_log method would expect User model's
FK to be named `id`. When changing that FK name, admin/index.html
rendering would fail.
This includes:
* Changed the use of id for the use of pk property.
* Added a regression test that fails without the patch.
This commit refs #20088 .
2013-03-19 19:30:43 -03:00
Deric Crago
9d6ecc6bc6
Fixed #19327 -- Added handling of double login attempts in admin.
...
Thanks to Krzysztof Jurewicz for initial patch and
adupin for tests.
2013-03-18 17:11:07 -07:00
Aymeric Augustin
31b5275235
Fixed #13260 -- Quoted arguments interpolated in URLs in reverse.
2013-03-18 23:58:22 +01:00
Aymeric Augustin
9dc5702932
Fixed #19456 -- Avoid infinite recursion when tracing LazyObject.__init__.
...
Thanks blaze33 for the patch.
2013-03-18 11:22:43 +01:00
Aymeric Augustin
0efafa4c54
Fixed #18447 -- Made LazyObject unwrap on dict access.
...
Thanks Roman Gladkov and Zbigniew Siciarz.
2013-03-18 11:10:19 +01:00
Aymeric Augustin
20a91cce04
Fixed #17037 -- Added a --all option to diffsettings.
2013-03-18 00:03:58 +01:00
Anssi Kääriäinen
46f4b19920
Removed debug code
2013-03-17 11:31:15 +02:00
Baptiste Mispelon
d5683bd06b
Fix #20058 : Make compilemessages use stdout instead of stderr.
2013-03-16 19:48:40 +01:00
Anssi Kääriäinen
2a2708e1b2
Fixed #17502 -- Made joining in inheritance cases consistent
...
The original problem was that when filtering two levels up in
inheritance chain, Django optimized the join generation so that the
middle model was skipped. But then Django generated joins from top
to middle to bottom for SELECT clause, and thus there was one extra
join (top->middle->bottom + top -> bottom).
This case is fixed in master as the filtering optimization is gone.
This has the side effect that in some cases there is still extra join
if the SELECT clause doesn't contain anything from middle or bottom.
2013-03-15 11:06:26 +02:00
Aymeric Augustin
3f2befc931
Deprecated django.views.defaults.shortcut.
2013-03-14 20:30:23 +01:00
Claude Paroz
2f121dfe63
Fixed #17051 -- Removed some 'invalid' field error messages
...
When the 'invalid' error message is set at field level, it masks
the error message raised by the validator, if any.
2013-03-14 17:03:43 +01:00
Claude Paroz
34d098665d
Add a specific error message for URLValidator
2013-03-14 15:26:30 +01:00
Claude Paroz
9883551d50
Fixed #20039 -- Fixed has_changed form detection for required TypedChoiceFields
...
Thanks Florian Apolloner for the report and the review.
Also fixes #19643 .
2013-03-14 14:49:07 +01:00
Anssi Kääriäinen
6b4834952d
Fixed #16649 -- Refactored save_base logic
...
Model.save() will use UPDATE - if not updated - INSERT instead of
SELECT - if found UPDATE else INSERT. This should save a query when
updating, but will cost a little when inserting model with PK set.
Also fixed #17341 -- made sure .save() commits transactions only after
the whole model has been saved. This wasn't the case in model
inheritance situations.
The save_base implementation was refactored into multiple methods.
A typical chain for inherited save is:
save_base()
_save_parents(self)
for each parent:
_save_parents(parent)
_save_table(parent)
_save_table(self)
2013-03-14 11:01:47 +02:00
Florian Apolloner
22b7870e40
Began implementing a shared set of test models to speed up tests.
2013-03-13 23:25:26 +01:00
Jacob Kaplan-Moss
1059da8de6
Merge pull request #900 from bmispelon/ticket-20022
...
Fix #20022 : Correctly handle prefixes with url-unsafe characters in reverse()
2013-03-13 22:39:25 +01:00
Baptiste Mispelon
4fa7f3cdd9
Fix #20022 : Correctly handle prefixes with url-unsafe characters in reverse().
2013-03-13 18:19:29 +01:00
Aymeric Augustin
83a416f5e7
Made atomic usable when autocommit is off.
...
Thanks Anssi for haggling until I implemented this.
This change alleviates the need for atomic_if_autocommit. When
autocommit is disabled for a database, atomic will simply create and
release savepoints, and not commit anything. This honors the contract of
not doing any transaction management.
This change also makes the hack to allow using atomic within the legacy
transaction management redundant.
None of the above will work with SQLite, because of a flaw in the design
of the sqlite3 library. This is a known limitation that cannot be lifted
without unacceptable side effects eg. triggering arbitrary commits.
2013-03-13 15:17:40 +01:00
Anssi Kääriäinen
bd0cba58aa
Fixed failing aggregation tests on MySQL
2013-03-13 12:44:24 +02:00
Anssi Kääriäinen
d3f00bd570
Refactored qs.add_q() and utils/tree.py
...
The sql/query.py add_q method did a lot of where/having tree hacking to
get complex queries to work correctly. The logic was refactored so that
it should be simpler to understand. The new logic should also produce
leaner WHERE conditions.
The changes cascade somewhat, as some other parts of Django (like
add_filter() and WhereNode) expect boolean trees in certain format or
they fail to work. So to fix the add_q() one must fix utils/tree.py,
some things in add_filter(), WhereNode and so on.
This commit also fixed add_filter to see negate clauses up the path.
A query like .exclude(Q(reversefk__in=a_list)) didn't work similarly to
.filter(~Q(reversefk__in=a_list)). The reason for this is that only
the immediate parent negate clauses were seen by add_filter, and thus a
tree like AND: (NOT AND: (AND: condition)) will not be handled
correctly, as there is one intermediary AND node in the tree. The
example tree is generated by .exclude(~Q(reversefk__in=a_list)).
Still, aggregation lost connectors in OR cases, and F() objects and
aggregates in same filter clause caused GROUP BY problems on some
databases.
Fixed #17600 , fixed #13198 , fixed #17025 , fixed #17000 , fixed #11293 .
2013-03-13 10:44:49 +02:00
Anssi Kääriäinen
d744c550d5
Fixed #19964 -- Removed relabel_aliases from some structs
...
Before there was need to have both .relabel_aliases() and .clone() for
many structs. Now there is only relabeled_clone() for those structs
where alias is the only mutable attribute.
2013-03-12 21:33:47 +02:00
Aymeric Augustin
885d98d24a
Fixed #20028 -- Made atomic usable on callable instances.
...
Thanks Anssi for the report.
2013-03-12 10:52:16 +01:00
Aymeric Augustin
f8a634afa2
Fixed tests that relied on MANAGERS not being empty.
...
Regression in d0561242
.
2013-03-11 23:30:02 +01:00
Jacob Kaplan-Moss
d056124269
Remove a special case for comment tests from runtests.py.
2013-03-11 15:38:53 -05:00
Aymeric Augustin
b746f8a9e3
Adjusted query counts to account for new savepoints.
2013-03-11 21:07:19 +01:00
Aymeric Augustin
55a9be8ecf
Ran a test that closes the database connection outside of a transaction.
2013-03-11 19:42:59 +01:00
Claude Paroz
9b74a8391d
Removed forced settings in runtests
...
Tests that require USE_I18N, LOGIN_URL or certain MIDDLEWARE_CLASSES
should be decorated appropriately.
2013-03-11 17:46:56 +01:00
Aymeric Augustin
e654180ce2
Improved the API of set_autocommit.
2013-03-11 15:10:58 +01:00
Aymeric Augustin
86fd920f67
Removed a test that no longer makes any sense.
...
Since unmanaged == autocommit, there's nothing to commit or roll back.
2013-03-11 15:05:04 +01:00
Aymeric Augustin
0cee3c0e43
Updated a test that doesn't make sense with autocommit.
2013-03-11 15:05:04 +01:00
Aymeric Augustin
107d9b1d97
Added an option to disable the creation of savepoints in atomic.
2013-03-11 15:05:04 +01:00
Aymeric Augustin
ac37ed21b3
Deprecated TransactionMiddleware and TRANSACTIONS_MANAGED.
...
Replaced them with per-database options, for proper multi-db support.
Also toned down the recommendation to tie transactions to HTTP requests.
Thanks Jeremy for sharing his experience.
2013-03-11 15:04:05 +01:00
Aymeric Augustin
7c46c8d5f2
Added some assertions to enforce the atomicity of atomic.
2013-03-11 14:48:55 +01:00
Aymeric Augustin
d7bc4fbc94
Implemented an 'atomic' decorator and context manager.
...
Currently it only works in autocommit mode.
Based on @xact by Christophe Pettus.
2013-03-11 14:48:55 +01:00
Aymeric Augustin
4b31a6a9e6
Added support for savepoints in SQLite.
...
Technically speaking they aren't usable yet.
2013-03-11 14:48:55 +01:00
Aymeric Augustin
3bdc7a6a70
Deprecated transaction.is_managed().
...
It's synchronized with the autocommit flag.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
ba5138b1c0
Deprecated transaction.commit/rollback_unless_managed.
...
Since "unless managed" now means "if database-level autocommit",
committing or rolling back doesn't have any effect.
Restored transactional integrity in a few places that relied on
automatically-started transactions with a transitory API.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
af9e9386eb
Enabled autocommit for PostgreSQL.
...
For users who didn't activate autocommit in their database options, this
is backwards-incompatible in "non-managed" aka "auto" transaction state.
This state now uses database-level autocommit instead of ORM-level
autocommit.
Also removed the uses_autocommit feature which lost its purpose.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
8717b0668c
Separated autocommit and isolation level handling for PostgreSQL.
...
Autocommit cannot be manipulated independently from an open connection.
This commit introduces a minor change in behavior: entering transaction
management forces opening a databasse connection. This shouldn't be
backwards incompatible in any practical use case.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
7aacde84f2
Made transaction.managed a no-op and deprecated it.
...
enter_transaction_management() was nearly always followed by managed().
In three places it wasn't, but they will all be refactored eventually.
The "forced" keyword argument avoids introducing behavior changes until
then.
This is mostly backwards-compatible, except, of course, for managed
itself. There's a minor difference in _enter_transaction_management:
the top self.transaction_state now contains the new 'managed' state
rather than the previous one. Django doesn't access
self.transaction_state in _enter_transaction_management.
2013-03-11 14:48:53 +01:00
Aymeric Augustin
ce76fbfc5a
Fixed #20019 -- Ensured HttpRequest.resolver_match always exists.
...
Obviously it isn't set until the URL is resolved.
2013-03-10 23:28:19 +01:00
Ramiro Morales
7fca4416c7
Made (make|compile)messages check for availability of gettext commands.
...
Refs #19584 .
2013-03-10 17:31:11 -03:00
Claude Paroz
6a91b63842
Fixed #19923 -- Display tracebacks for non-CommandError exceptions
...
By default, show tracebacks for management command errors when the
exception is not a CommandError.
Thanks Jacob Radford for the report.
2013-03-09 12:38:45 +01:00
Claude Paroz
cbfb8ed53b
Fixed a regression in forms changed_data
...
Thanks Loic Bistuer for spotting the regression and the initial
patch. Refs #16612 .
2013-03-08 18:19:24 +01:00
Loic Bistuer
6983a1a540
Fixed #15363 -- Renamed and normalized to `get_queryset` the methods that return a QuerySet.
2013-03-08 10:11:45 -05:00
Aymeric Augustin
477d737e1e
Merge pull request #850 from bmispelon/ticket-19916
...
Fix 19916. Smarter tokenizing of contrib.comment's templatetags arguments
2013-03-07 12:12:29 -08:00
Alex Gaynor
bbbd698c7a
Added a ManyToManyField(db_constraint=False) option, this allows not creating constraints on the intermediary models.
2013-03-07 11:24:51 -08:00
Baptiste Mispelon
81804ae474
Fix 19916. Smarter tokenizing of contrib.comment's templatetags arguments.
2013-03-07 19:30:38 +01:00
Claude Paroz
4cccb85e29
Fixed #19997 -- Added custom EMPTY_VALUES to form fields
...
Thanks Loic Bistuer for the report and the patch.
2013-03-07 15:22:03 +01:00
Igor Támara
e2ee02c5bd
Fixed #19951 -- Admin: Invalid model PK values shouldn't cause 500 status.
...
Avoid ValueError in admin when passing a string as PK for an inherited
model with an integer PK field.
Thanks ikks for the patch. See also #11191 .
2013-03-06 21:38:44 -03:00
Ramiro Morales
c31a9793c6
Merge pull request #882 from loic/testfix
...
Fixed minor warnings in tests.
2013-03-06 16:22:06 -08:00
Preston Holmes
876fc39128
PEP8 cleanup of functional.py
2013-03-06 16:14:46 -08:00
Preston Holmes
0ea5bf88dd
Fixed #19543 -- implemented SimpleLazyObject.__repr__
...
Thanks to Florian Hahn for the patch
2013-03-06 16:13:12 -08:00
Aymeric Augustin
b3aa853ec5
Used more precise test assertions.
2013-03-06 15:33:35 +01:00
Loic Bistuer
9ba0e4e4ee
Fixed minor warnings in tests.
2013-03-06 01:13:36 +07:00
Juan Pedro Fisanotti
d9330d5be2
Fixed #6585 -- Admin relationship widgets: Respect ordering defined by target model's ModelAdmin.
...
Thanks Gary Wilson for the report and Juan Pedro Fisanotti, Carlos
Matías de la Torre for the fix.
2013-03-04 18:08:53 -03:00
Javier Mansilla
3ea0c7d35a
Fixed #19838 -- Admin: Don't leak a 500 HTTP status when trying to delete protected FKs.
...
Thanks rafadev for the report and Javier Mansilla for the fix.
2013-03-04 13:30:59 -03:00
Ramiro Morales
60dd4eabe7
Removed mentions of modeltests.
2013-03-03 18:44:06 -03:00
matiasb
804366327d
Fixed #19915 - Made blocktrans tag honor TEMPLATE_STRING_IF_INVALID.
...
Thanks Natalia Bidart for the report and Matías Bordese for the fix.
2013-03-03 16:10:11 -03:00
Claude Paroz
384c180e41
Fixed #19917 -- Added microseconds in default TIME_INPUT_FORMATS
...
Thanks minddust for the report.
2013-03-02 18:11:10 +01:00
Aymeric Augustin
e0449316eb
Fixed #18130 -- Made the isolation level configurable on PostgreSQL.
...
Thanks limscoder for the report and niwi for the draft patch.
2013-03-02 15:05:49 +01:00
Claude Paroz
c5a25c2771
Add introspection support for BinaryField
2013-03-02 10:29:03 +01:00
Claude Paroz
d680a3f447
Added support for serializing BinaryField
2013-03-02 10:29:02 +01:00
Claude Paroz
8ee1eddb7e
Add a BinaryField model field
...
Thanks Michael Jung, Charl Botha and Florian Apolloner for review
and help on the patch.
2013-03-02 10:29:02 +01:00
Simon Charette
0f306cad84
Import `CaptureQueriesContext` from its original module.
2013-03-02 03:45:42 -05:00
Simon Charette
fb3d85bd14
Fixed #10399 -- Tested that o2o field updates are not constrained by an inner query.
2013-03-02 03:24:08 -05:00
Simon Charette
952ba5237e
Added a context manager to capture queries while testing.
...
Also made some import cleanups while I was there.
Refs #10399 .
2013-03-02 02:41:14 -05:00
Claude Paroz
3318595c0b
Fixed #18898 -- Added tests with a fix for ModelMultipleChoiceField
2013-03-01 09:35:18 +01:00
Claude Paroz
892bc91cb0
Fixed #16612 -- Improved has_changed detection for localized field values
...
Thanks Simon Charette for the review.
2013-03-01 09:35:04 +01:00
Aymeric Augustin
cf30469164
Fixed tests broken in 2ee21d9
.
2013-02-28 17:08:16 +01:00
Aymeric Augustin
2ee21d9f0d
Implemented persistent database connections.
...
Thanks Anssi Kääriäinen and Karen Tracey for their inputs.
2013-02-28 15:28:13 +01:00
Aymeric Augustin
aa089b106b
Fixed #5241 -- Kept active transalation in LocaleMiddleware.process_response.
2013-02-28 14:21:48 +01:00
Anssi Kääriäinen
06de130dae
Fixed #12823 -- Was already fixed in master, tests added
...
Also added a little improvement to sql/query.py to get rid of
non-necessary IS NOT NULL check.
2013-02-28 15:05:48 +02:00
Łukasz Langa
af3321a1e8
use the real path to fix OS X /var/folders vs. /private/var/folders mismatch
2013-02-27 23:33:47 +01:00
Anssi Kääriäinen
21189cb80b
Made dateformat tests reactivate original language
2013-02-27 23:48:17 +02:00
Aymeric Augustin
7aaa8a7779
Fixed a test that relied on database exceptions not being wrapped.
2013-02-27 21:12:48 +01:00
Aymeric Augustin
b2c697b029
Fixed a PendingDeprecationWarning in template_tests.
2013-02-27 21:09:27 +01:00
Anssi Kääriäinen
50328f0a61
Fixed #19861 -- Transaction ._dirty flag improvement
...
There were a couple of errors in ._dirty flag handling:
* It started as None, but was never reset to None.
* The _dirty flag was sometimes used to indicate if the connection
was inside transaction management, but this was not done
consistently. This also meant the flag had three separate values.
* The None value had a special meaning, causing for example inability
to commit() on new connection unless enter/leave tx management was
done.
* The _dirty was tracking "connection in transaction" state, but only
in managed transactions.
* Some tests never reset the transaction state of the used connection.
* And some additional less important changes.
This commit has some potential for regressions, but as the above list
shows, the current situation isn't perfect either.
2013-02-27 17:54:27 +02:00
Łukasz Langa
40b9f4fb8b
[py3] Always fed hashlib with bytes.
2013-02-27 10:02:07 +01:00
Ramiro Morales
a28e2e7c4d
Removed a .mo file incorrectly put under Git control.
2013-02-26 22:45:08 -03:00
Ramiro Morales
f0bd553922
Simplified compilemessages tests a bit.
2013-02-26 22:30:49 -03:00
Ramiro Morales
dfa9324966
Don't use os.system() in compilemessages.
...
Fixes #19584 .
This implies stop storing file path command line arguments in envvars as
a security measure to start relying on with Popen's shell=False instead,
and addition of an 'utils' module.
Thanks kmichel_wgs for the report.
2013-02-26 21:31:53 -03:00
Claude Paroz
58a2fc820e
Fixed i18n test to match changed translation
...
Forward port of ab6ff2e0ac
from stable/1.5
2013-02-26 21:51:06 +01:00
Florian Apolloner
33234aa8f7
Fixed discovery of the Django installation during tests.
...
If Django was symlinked into site-packages the previous approach to discover
the tests subdirectory would fail. The revised version now always points to
the location of the source and not the import path.
2013-02-26 21:04:32 +01:00
Florian Apolloner
0fe11fca40
Changed test_runner tests to use full python path for settings files.
2013-02-26 16:02:24 +01:00
Florian Apolloner
1535fcfdba
fixed admin_scripts tests on python 3.3
2013-02-26 15:38:11 +01:00
Florian Apolloner
0dc7ff6b7a
Ensured that we have an absolute path to RUNTESTS_DIR.
...
This is needed to make 'python runtests.py' work, otherwise only
'python ./runtests.py' would work.
2013-02-26 15:20:37 +01:00
Florian Apolloner
4d9f39f307
Renamed a template to be found by the loaders.
2013-02-26 14:36:58 +01:00
Florian Apolloner
33836cf88d
Renamed some tests and removed references to modeltests/regressiontests.
2013-02-26 14:36:57 +01:00
Florian Apolloner
737a5d71f0
Adjusted coveragerc
2013-02-26 14:36:57 +01:00
Florian Apolloner
fc074db29c
Adjusted runtests to the new layout.
2013-02-26 14:36:57 +01:00
Florian Apolloner
89f40e3624
Merged regressiontests and modeltests into the test root.
2013-02-26 14:36:57 +01:00
Florian Apolloner
b3d2ccb5bf
Removed __init__.py files.
2013-02-26 14:36:57 +01:00
Florian Apolloner
41d7a9a907
Moved test_templates to templates to prevent issues with regressiontests/templates later on.
2013-02-26 14:36:57 +01:00
Aymeric Augustin
8dd8400f7e
Updated an inaccurate comment.
...
Tests can run nearly as fast under PostgreSQL and MySQL as under SQLite
with a bit of configuration and the speedup is always a good thing.
2013-02-26 10:00:14 +01:00
Carl Meyer
6a8f95d812
Fixed a caching test on Python 3.
2013-02-25 18:12:55 -07:00
Łukasz Langa
6a057e1595
Fixed #18191 -- Don't consider Accept-Language redundantly in cache key.
...
Thanks to choongmin for the original patch.
2013-02-25 16:10:57 -07:00
Aymeric Augustin
e76147a83a
Fixed #19634 -- Added proper __hash__ methods.
...
Classes overriding __eq__ need a __hash__ such that equal objects have
the same hash.
Thanks akaariai for the report and regebro for the patch.
2013-02-25 23:05:20 +01:00
Carl Meyer
509798ae06
Use built-in fixture support rather than calling loaddata in setUp().
2013-02-25 12:13:10 -07:00
Aymeric Augustin
86b96038f2
Merge pull request #847 from fhahn/ticket_18176
...
Fixed #18176 -- Added test for year lookups with year < 1000
2013-02-25 09:26:56 -08:00
Carl Meyer
906dc8522a
Fixed #19854 -- Turn Django's own Selenium tests off by default.
2013-02-25 10:14:42 -07:00
Florian Hahn
f28c301a47
Fixed #18176 -- Added test for year lookups with year < 1000
...
Thanks Tomas Ehrlich for the initial test
2013-02-25 17:13:27 +01:00
Claude Paroz
6d52bcbb7c
Fixed #19903 -- Fixed unbalanced setUp/tearDown calls in LiveServerAddress test
2013-02-25 08:58:11 +01:00
Aymeric Augustin
7b49da1c38
Changed testing strategy used in 6b03179e
.
...
Avoid polluting the app cache as it causes unrelated test failures.
Refs #19688 .
2013-02-25 00:09:13 +01:00
Julien Phalip
ae2a8bb456
Fixed a test that was failing in Python 3.
...
The issue was that as of Python 3, the generators' `next()`
method becomes `__next()`. Thanks Alex Gaynor for noticing that.
Refs #19890 .
2013-02-24 13:47:14 -08:00
Julien Phalip
a8449d4362
Merge pull request #824 from ambv/languagecode
2013-02-24 12:56:14 -08:00
Simon Charette
6b03179e12
Fixed #19688 -- Allow model subclassing with a custom metaclass using six.with_metaclass
2013-02-24 17:32:34 +01:00
Christopher Medrela
636c45fc58
Fixed #19890 -- ifchanged templatetag rendered its content twice
...
The content of ifchanged template tag was rendered twice: first time, to
compare it with the previous value and the second time, to return the
rendered output.
2013-02-24 16:49:28 +01:00
Diederik van der Boor
8503120c10
Fixed #15849 -- Made IfChanged node thread safe.
...
Previously, the ifchanged node stored state on `self._last_seen`,
thereby giving undesired results when the node is reused by another
thread at the same time (e.g. globally caching a Template object).
Thanks to akaihola for the report and Diederik van der Boor and
Bas Peschier for the patch.
2013-02-24 16:06:55 +01:00
Zbigniew Siciarz
0a8402eb05
Test case and docs for custom context data in feeds
...
Thanks Paul Winkler for the initial patch. (Ref #18112 ).
2013-02-24 08:33:20 -06:00
Florian Apolloner
4506ae0497
Merge pull request #717 from slurms/ticket_19746
...
Fixed #19746 -- Allow deserialization of pk-less data
2013-02-24 06:31:14 -08:00
Łukasz Langa
8c8f94fe9d
Fixes #19763 - LocaleMiddleware should check for supported languages in settings.LANGUAGE_CODE
2013-02-24 14:43:45 +01:00
Tomek Paczkowski
99edbe0e27
Fixed #19253 -- Extracted template cache key building logic
...
Introduced a public function
django.core.cache.utils.make_template_fragment_key
Thanks @chrismedrela for fruitful cooperation.
2013-02-24 14:32:45 +01:00
Aymeric Augustin
7106a1e594
Merge pull request #819 from erikr/master
...
Fixed #16302 -- Ensured contrib.comments is IPv6 capable.
2013-02-24 05:02:00 -08:00
Erik Romijn
ade992c61e
Fixed #16302 -- Ensure contrib.comments is IPv6 capable
...
Changed the ip_address field for Comment to GenericIPAddressField. Added
instructions to the release notes on how to update the schema of existing
databases.
2013-02-24 13:58:38 +01:00
Bas Peschier
5a9b2bce24
Fixed #19810 -- MemcachedCache now uses pickle.HIGHEST_PROTOCOL
2013-02-24 13:56:15 +01:00
Wiktor Kolodziej
f07a5f0a21
Fixed #11295 : If ModelAdmin.queryset returns a filtered QS don't require a 2nd count call
...
Original patch rewritten, added tests and get_filters_params method for ChangeList class.
Thanks Alex for the report.
2013-02-24 13:23:23 +01:00
Florian Apolloner
e4ee3d8fca
Fixed a few ResourceWarnings.
2013-02-24 13:11:19 +01:00
Honza Král
e4e1287590
Merge pull request #817 from rybaktomasz/ticket_5568
...
Fixes #5568 -- DROP INDEX subcommand
2013-02-24 04:02:26 -08:00
Honza Kral
cbb9f629b8
Revert "fixes #19263" - Fails if not SQLite
...
This reverts commit 2b76f19f2b
.
2013-02-24 12:38:32 +01:00
Tomasz Rybak
d7429defe6
Add sqldropindexes to manage
...
Change patch from https://code.djangoproject.com/ticket/5568
to work on modern Django.
Add special case for MySQL which has different syntax for DROP INDEX.
Add unit tests for the new functionality.
2013-02-24 12:38:28 +01:00
Honza Kral
5a6a4249f3
Removing unneeded tearDown code.
2013-02-24 12:31:00 +01:00
George Song
44164c5c30
Fixed #19896 -- Committed after clearing cache in the database.
2013-02-24 12:15:02 +01:00
Florian Apolloner
f56ca3f0e6
Fixed the usage of the deprecated assertEquals.
2013-02-24 11:15:17 +01:00
Aymeric Augustin
c10ed58746
Caught warnings in the templates tests. Refs #17906 .
...
This was missing from f49e9a517f
.
2013-02-24 10:28:05 +01:00
Honza Král
fc38d6a92b
Merge pull request #813 from HiddenData/ticket-19263
...
fixes #19263 - EmptyResultSet in subquery causes incorrect SQL
2013-02-23 15:05:24 -08:00
Marcin Biernat
2b76f19f2b
fixes #19263
2013-02-23 23:53:46 +01:00
Honza Král
692902b227
Merge pull request #778 from viciu/19609
...
Fixed #19609 : admin Inlines doesn't display help_text for readonly fields
2013-02-23 14:34:57 -08:00
Honza Kral
ef1e6ef1eb
Merge branch 'ticket19872' of https://github.com/oinopion/django
2013-02-23 23:32:09 +01:00
Honza Kral
2b48fcc607
Fixed #18491 -- deleting a proxy doesn't show warning about cascade deletes
2013-02-23 23:20:34 +01:00
Tomek Paczkowski
b88abd6840
Fixed #19872
...
Made cached_property to behave as property when accessed via class.
2013-02-23 23:20:00 +01:00
Aleksandra Sendecka
32a7ab2148
Fixed #19526
...
CSS specifications governs that syntax is case insensitive.
This modifies CachedFilesMixin to support that.
2013-02-23 23:05:22 +01:00
Klaas van Schelven
1c11ee6345
Fixed #18829 -- Fixed ModelChoiceIterator length
...
Thanks facundo.olano at gmail.com for the report and thikonom for
the initial patch.
2013-02-23 22:27:07 +01:00
Alex Gaynor
150e202172
Some style fixes for stuff that was clearly brough tover from doctests.
2013-02-23 13:04:08 -08:00
Honza Král
10026c2ad0
Merge pull request #804 from oinopion/ticket18162
...
Fixes #18162 -- Specifying choices to Field overrides any form_class argument
2013-02-23 12:45:39 -08:00
Grzegorz Nosek
2cd0edaa47
Fixed 19895 -- Made second iteration over invalid queryset raise an exception too
...
When iteration over a queryset raised an exception, the result cache
remained initialized with an empty list, so subsequent iterations returned
an empty list instead of raising an exception
2013-02-23 14:35:27 -06:00
Łukasz Langa
539900f117
Fixes #17866 : Vary: Accept-Language header when language prefix used
2013-02-23 19:41:33 +01:00
Honza Kral
bfd4a71d41
One last final fix for 0ad76843
. Tested on py3 and py2
2013-02-23 19:27:37 +01:00
Honza Král
0a341ab40d
Merge pull request #791 from khalas/ticket_19811
...
Changed %r to %s in get_language_info error message
2013-02-23 10:16:23 -08:00
Tomek Paczkowski
b6f4a92ff4
Proposed fix for #18162 .
2013-02-23 19:01:38 +01:00
Konrad Hałas
48dc0cbf2a
Changed %r to %s in get_language_info error message.
2013-02-23 18:54:54 +01:00
Florian Apolloner
f368c25f10
Fixed errors introduced in 664855b74e
2013-02-23 18:47:36 +01:00
Florian Apolloner
5ae0c933a8
Fixed errors introduced in 21f333bcef
. Refs #17751
2013-02-23 18:43:34 +01:00
Claude Paroz
cc53d9b30b
Fixed #15877 -- Improved exception when ModelForm has no model class
...
Thanks theaspect at gmail.com for the report and volrath for the
patch.
2013-02-23 18:32:29 +01:00
Wiktor Kolodziej
67dd54dc84
Fixed #19609 : admin Inlines doesn't display help_text for readonly fields
...
Refactoring: field was renamed to field_name, since flatten_fieldsets returns field name, not field.
Original patch from Marc Aymerich Gubern
2013-02-23 18:24:32 +01:00
Honza Král
a05ab448f7
Merge pull request #781 from zsiciarz/ticket_19854
...
Fixed #19854 -- Added test runner option to skip Selenium tests
2013-02-23 08:55:34 -08:00
Zbigniew Siciarz
1cd2f51eb4
Added test runner option to skip Selenium tests ( #19854 ).
2013-02-23 17:45:26 +01:00
Claude Paroz
335a060fa6
Minor cleanups in templates test imports
2013-02-23 17:45:05 +01:00
Lennart Regebro
687d2e967d
Fixed #19827 -- Kept stacktrace in defaulttags exception reraising
...
Thanks Kronuz for the report and the initial patch.
2013-02-23 17:43:17 +01:00
Honza Král
0ad76843b5
Merge pull request #777 from khalas/ticket_19811
...
Fixed #19811 - Added language code fallback in get_language_info
2013-02-23 08:30:27 -08:00
Honza Král
129d2e8f85
Merge pull request #775 from HiddenData/ticket-18899
...
Fixed #18899 -- FileSystemStorage.save should support any file-like objects
2013-02-23 08:04:41 -08:00
Konrad Hałas
6bd6a56896
Fixed #19811 - Added language code fallback in get_language_info.
2013-02-23 17:02:07 +01:00
Aymeric Augustin
5278776a88
Merge pull request #751 from bmispelon/ticket-6271
2013-02-23 07:47:58 -08:00
Marcin Biernat
664855b74e
#18899 FileSystemStorage.save should support any file-like objects
2013-02-23 16:40:50 +01:00
Vladimir A Filonov
f49e9a517f
Fixed #17906 - Autoescaping {% cycle %} and {% firstof %} templatetags.
...
This commit adds "future" version of these two tags with auto-escaping
enabled.
2013-02-23 16:16:39 +01:00
Tomek Paczkowski
3dddbc0f23
Fixed #19816 : pre-evaluate queryset on m2m set
...
In ReverseManyRelatedObjectsDescriptor.__set__, evaluate possible
queryset to avoid problems when clear() would touch data this queryset
returns.
2013-02-23 15:50:33 +01:00
Baptiste Mispelon
069280a689
Used token.split_contents() for tokenisation in template tags accepting variables.
...
Fixed #6271 , #18260 .
2013-02-23 15:15:30 +01:00
Erik Romijn
21f333bcef
Fix #17751 : Added stripping of whitespace for IPAddressField/GenericIPAddressField
2013-02-23 14:44:57 +01:00
Claude Paroz
7ec2a21be1
Fixed #19686 -- Added HTML5 number input type
...
Thanks Simon Charette for his help on the patch. Refs #16630 .
2013-02-23 10:18:08 +01:00
Anssi Kääriäinen
dcf651c27e
Fixed Oracle specific failures in commands_sql tests
2013-02-23 01:08:48 +02:00
Anssi Kääriäinen
f565c6f999
Marked a test as expected failure. Refs #19884
2013-02-23 00:33:02 +02:00
Anssi Kääriäinen
88c726bea0
Skipped a test on Oracle
2013-02-23 00:33:02 +02:00
Anssi Kääriäinen
09fcb70c80
Fixed empty strings + to_field regression on Oracle
...
Querying the reverse side of nullable to_field relation, where both
sides can contain null values resulted in incorrect results. The reason
was not detecting '' as NULL.
Refs #17541
2013-02-23 00:05:31 +02:00
Baptiste Mispelon
f13bfbec70
Fixed #19882 -- Smarter tokenizing of {% for %} tag arguments.
2013-02-22 19:19:33 +01:00
Anssi Kääriäinen
3c6318e831
Fixed #19870 -- Regression in select_related in inheritance cases
...
There was a regression in case two models inherited the same parent,
and one contained a foreign key to other. When select_related travelled
the foreign key the other model reused the parent join made by the
first model. This was likely caused by Query.join_parent_model()
addition in commit 68985db482
.
Thanks to Trac alias loic84 for report & tests.
2013-02-21 12:01:23 +02:00
Anssi Kääriäinen
50677b29af
Made a couple of selenium tests wait for page loaded
...
The admin_widgets tests were issuing click() to the browser but
didn't wait for the effects of those clicks. This caused the resulting
request to be processed concurrently with the test case. When using
in-memory SQLite this caused weird failures.
Also added wait_page_loaded() to admin selenium tests for code
reuse.
Fixed #19856
2013-02-20 23:56:57 +02:00
Anssi Kääriäinen
e8fc3f3783
Added a test for negated Q object querying
...
The added test is from the patch in ticket #19672 (written by Ian
Kelly). Fixed #19672 , refs #19849 .
2013-02-20 21:45:36 +02:00
Anssi Kääriäinen
edf93127bf
Removed join() promote kwarg
...
The join promote=True was over-aggressive in select_related handling.
After that was removed, the only other user was query.combine(). That
use case is very easy to handle locally, so there is no more need for
the join(promote=True) flag.
Refs #19849 .
2013-02-20 21:43:44 +02:00
Anssi Kääriäinen
3fef304ff2
Refactored negated IS NULL handling
...
This one cleaned up add_filter() negated filter generation. As a side
effect split_exclude() was cleaned up, too.
Refs #19849
2013-02-20 21:34:01 +02:00
Alex Gaynor
b55cde054e
Added a db_constraint option to ForeignKeys.
...
This controls whether or not a database level cosntraint is created. This is useful in a few specialized circumstances, but in general should not be used!
2013-02-20 11:27:32 -08:00
Claude Paroz
ae2d04f726
Add test for collapsible fieldset functionality in admin
2013-02-20 13:48:49 +01:00
Aymeric Augustin
35c991aa06
Added a default limit to the maximum number of forms in a formset.
...
This is a security fix. Disclosure and advisory coming shortly.
2013-02-19 11:23:30 -07:00
Carl Meyer
1f39eafd60
Checked object permissions on admin history view.
...
This is a security fix. Disclosure and advisory coming shortly.
Patch by Russell Keith-Magee.
2013-02-19 11:23:30 -07:00
Carl Meyer
c6d69c12ea
Restrict the XML deserializer to prevent network and entity-expansion DoS attacks.
...
This is a security fix. Disclosure and advisory coming shortly.
2013-02-19 11:23:30 -07:00
Carl Meyer
d51fb74360
Added a new required ALLOWED_HOSTS setting for HTTP host header validation.
...
This is a security fix; disclosure and advisory coming shortly.
2013-02-19 11:23:29 -07:00
Anssi Kääriäinen
4b9fa49bc0
Avoided related_name conflicts in tests
2013-02-19 03:13:13 +02:00
Anssi Kääriäinen
607772b942
Removed accidentally committed file
2013-02-19 01:55:40 +02:00
Florian Hahn
3e71368423
Fixed #10870 -- Added aggreation + generic reverse relation test
2013-02-19 01:42:02 +02:00
Anssi Kääriäinen
b4492a8ca4
Fixed #19837 -- Refactored split_exclude() join generation
...
The refactoring mainly concentrates on making sure the inner and outer
query agree about the split position. The split position is where the
multijoin happens, and thus the split position also determines the
columns used in the "WHERE col1 IN (SELECT col2 from ...)" condition.
This commit fixes a regression caused by #10790 and commit
69597e5bcc
. The regression was caused
by wrong cols in the split position.
2013-02-19 01:10:49 +02:00
Aymeric Augustin
aea98e8c53
Simplified MySQL version checking.
...
Django used to check the version of MySQL before handling the first
request, which required:
- opening a connection
- closing it, to avoid holding it idle until the first request.
This code isn't necessary any longer since Django dropped support for
some versions of MySQL, and other database backends don't implement a
similar dance. For consistency and maintenability, remove it.
Reverts 4423757c0c
.
Closes #18135 .
2013-02-18 21:46:26 +01:00
Aymeric Augustin
92837ae569
Avoided firing the request_finished signal in tests.
...
* Avoided calling BaseHttpResponse.close(). The test client take care of
that since acc5396e
.
* Disconnected the request_finished signal when this method must be
called. The test client has a similar implementation since bacb097a
.
2013-02-18 14:32:45 +01:00
Claude Paroz
632361611c
Fixed #19833 -- Fixed import parameter encoding in get_runner
...
Thanks Danilo Bargen for the report.
2013-02-16 13:31:13 +01:00
Aymeric Augustin
e74e207cce
Fixed #17260 -- Added time zone aware aggregation and lookups.
...
Thanks Carl Meyer for the review.
Squashed commit of the following:
commit 4f290bdb60
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Wed Feb 13 21:21:30 2013 +0100
Used '0:00' instead of 'UTC' which doesn't always exist in Oracle.
Thanks Ian Kelly for the suggestion.
commit 01b6366f3c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Wed Feb 13 13:38:43 2013 +0100
Made tzname a parameter of datetime_extract/trunc_sql.
This is required to work around a bug in Oracle.
commit 924a144ef8
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Wed Feb 13 14:47:44 2013 +0100
Added support for parameters in SELECT clauses.
commit b4351d2890
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Mon Feb 11 22:30:22 2013 +0100
Documented backwards incompatibilities in the two previous commits.
commit 91ef84713c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Mon Feb 11 09:42:31 2013 +0100
Used QuerySet.datetimes for the admin's date_hierarchy.
commit 0d0de288a5
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Mon Feb 11 09:29:38 2013 +0100
Used QuerySet.datetimes in date-based generic views.
commit 9c0859ff7c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Sun Feb 10 21:43:25 2013 +0100
Implemented QuerySet.datetimes on Oracle.
commit 68ab511a4f
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Sun Feb 10 21:43:14 2013 +0100
Implemented QuerySet.datetimes on MySQL.
commit 22d52681d3
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Sun Feb 10 21:42:29 2013 +0100
Implemented QuerySet.datetimes on SQLite.
commit f6800fd04c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Sun Feb 10 21:43:03 2013 +0100
Implemented QuerySet.datetimes on PostgreSQL.
commit 0c829c23f4
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Sun Feb 10 21:41:08 2013 +0100
Added datetime-handling infrastructure in the ORM layers.
commit 104d82a777
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Mon Feb 11 10:05:55 2013 +0100
Updated null_queries tests to avoid clashing with the __second lookup.
commit c01bbb3235
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Sun Feb 10 23:07:41 2013 +0100
Updated tests of .dates().
Replaced .dates() by .datetimes() for DateTimeFields.
Replaced dates with datetimes in the expected output for DateFields.
commit 50fb7a5246
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Sun Feb 10 21:40:09 2013 +0100
Updated and added tests for QuerySet.datetimes.
commit a8451a5004
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Sun Feb 10 22:34:46 2013 +0100
Documented the new time lookups and updated the date lookups.
commit 29413eab2b
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date: Sun Feb 10 16:15:49 2013 +0100
Documented QuerySet.datetimes and updated QuerySet.dates.
2013-02-16 09:19:04 +01:00
Claude Paroz
b19d83fc12
Improved input sanitizing with thousand separators
...
For languages with non-breaking space as thousand separator,
standard space input should also be allowed, as few people know
how to enter non-breaking space on keyboards. Refs #17217 .
Thanks Alexey Boriskin for the report and initial patch.
2013-02-15 16:37:52 +01:00
Claude Paroz
dcf8cd30ae
Updated FormattingTests test case to use settings contexts
2013-02-15 09:37:12 +01:00
Julien Phalip
7d5e35cdb4
Fixed #19829 -- Fixed index lookups for NumPy arrays in templates.
2013-02-14 23:29:15 -08:00
Michael van Tellingen
138de533ff
Fixed #19819 - Improved template filter errors handling.
...
Wrap the Parser.compile_filter method call with a try/except and call the
newly added Parser.compile_filter_error(). Overwrite this method in the
DebugParser to throw the correct error.
Since this error was otherwise catched by the compile_function try/except
block the debugger highlighted the wrong line.
2013-02-14 10:22:59 +01:00
Claude Paroz
ac4faa6dc3
Fixed #19693 -- Made truncatewords_html handle self-closing tags
...
Thanks sneawo for the report and Jonathan Loy for the patch.
2013-02-13 18:24:49 +01:00
Hiroki Kiyohara
e94f405d94
Fixed #18558 -- Added url property to HttpResponseRedirect*
...
Thanks coolRR for the report.
2013-02-13 10:29:32 +01:00
Anssi Kääriäinen
fafee74306
Removed try-except in django.db.close_connection()
...
The reason was that the except clause needed to remove a connection
from the django.db.connections dict, but other parts of Django do not
expect this to happen. In addition the except clause was silently
swallowing the exception messages.
Refs #19707 , special thanks to Carl Meyer for pointing out that this
approach should be taken.
2013-02-13 00:25:09 +02:00
Nick Sandford
278dad5b41
Fixed #19746 -- Allow deserialization of pk-less data
2013-02-12 17:10:42 +08:00
Simon Charette
a10f390804
Fixed #19044 -- Made `DeletionMixin` interpolate its `success_url`.
...
Thanks to nxvl and slurms for the initial patch, ptone for the review
and timo for the documentation tweaks.
2013-02-11 02:39:14 -05:00
Anssi Kääriäinen
604d8763dc
Fixed #19112 -- Reduced the amount of query params in a test
2013-02-10 21:08:19 +02:00
Anssi Kääriäinen
8ef3235034
Fixed #19720 -- Oracle ordering related delete regression
...
When a query had a complex where condition (a condition targeting more
than the base table) a subquery was used for deletion. However, the
query had default ordering from the model's meta and Oracle doesn't
work with ordered subqueries.
The regression was caused by fast-path deletion code introduced in
1cd6e04cd4
for fixing #18676 .
Thanks to Dylan Klomparens for the report.
2013-02-10 19:54:02 +02:00
Anssi Kääriäinen
a4e97cf315
Fixed #19707 -- Reset transaction state after requests
2013-02-10 13:55:54 +02:00
Claude Paroz
718afcafc2
Added tests for some sql_* management commands
2013-02-09 16:34:22 +01:00
Claude Paroz
f44922c795
Fixed #18906 -- Ignored to-be-deleted forms in formset validate_unique
...
Thanks c.pollock at bangor.ac.uk for the report.
2013-02-08 21:35:19 +01:00
Julien Phalip
db09a2de6e
Cleaned up some lingering signals in the test suite that were causing spurious failures with Pypy and Postgres.
2013-02-08 12:12:03 -08:00
Ramiro Morales
b5391515cd
Changed test assertion strategy used in 04d9730
.
2013-02-07 16:51:27 -03:00
Ramiro Morales
04d9730b12
Fixed #13085 -- Don't fail on creation of model with GFK to a model with __len__() returning zero.
...
Also, according to the comments on the ticket and its duplicates, added
tests execising saving an instance of a model with a GFK to:
* An unsaved object -- This actually doesn't generate the same failure
but another ORM-level exception. The test verifies it's the case.
* An instance of a model with a __nonzero__() method thant returns False
for it. This doesn't fail because that code path isn't executed.
* An instance of a model with a CharField PK and an empty value for it.
This doesn't fail.
2013-02-07 16:05:54 -03:00
Aymeric Augustin
720888a146
Fixed #15808 -- Added optional HttpOnly flag to the CSRF Cookie.
...
Thanks Samuel Lavitt for the report and Sascha Peilicke for the patch.
2013-02-07 09:48:08 +01:00
Julien Phalip
6afc85af47
Fixed a typo in the test suite that was causing some spurious failures with pypy.
2013-02-06 22:10:13 -08:00
Alexey Boriskin
d18f796a48
Fixed #19704 -- Make use of new ungettext_lazy function at appropriate places
2013-02-06 22:01:55 +01:00
Claude Paroz
d7504a3d7b
Improved regex in strip_tags
...
Thanks Pablo Recio for the report. Refs #19237 .
2013-02-06 21:20:43 +01:00
Simon Charette
5449240c54
Fixed #9800 -- Allow "isPermaLink" attribute in <guid> element of an RSS item.
...
Thanks @rtnpro for the patch!
2013-02-06 05:28:05 -05:00
Simon Charette
a097ee32d8
Fixed #17683 -- Make sure `BaseModelFormSet` respects defined widgets.
2013-02-05 05:39:35 -05:00
Simon Charette
ec469ade2b
Fixed #19689 -- Renamed `Model._meta.module_name` to `model_name`.
2013-02-05 04:16:07 -05:00
Claude Paroz
40260bc30b
Fixed error message test assertions under Python 3.3
...
Thanks Florian Apolloner for testing.
2013-02-04 18:00:19 +01:00
Claude Paroz
7c5b244826
Fixed #17061 -- Factored out importing object from a dotted path
...
Thanks Carl Meyer for the report.
2013-02-04 16:38:25 +01:00
Ramiro Morales
869c9ba306
Fixed #19730 -- Don't validate importability of settings by using i18n in management commands.
...
They are handled independently now and the latter can be influenced by
the new BaseCommand.leave_locale_alone internal option.
Thanks chrischambers for the report, Claude, lpiatek, neaf and gabooo for
their work on a patch, originally on refs. #17379 .
2013-02-03 23:40:38 -03:00
Anssi Kääriäinen
f556df90be
Fixed #19645 -- Added tests for TransactionMiddleware
2013-02-03 16:26:46 +02:00
Julien Phalip
bc7a219b1e
Fixed Python 3.2 compatibility for a test.
2013-02-02 20:57:38 -08:00
Julien Phalip
293f7a2114
Fixed #17797 -- Enabled support for PATCH requests in the dummy test client. Thanks to pfarmer for the suggestion and initial patch.
2013-02-02 18:22:40 -08:00
Ramiro Morales
08dc90bccf
Fixed #14305 -- Switched inspectdb to create unmanaged models.
...
Thanks Ian Kelly for the report and initial patch.
2013-02-02 21:11:32 -03:00
Nick Sandford
0694d2196f
Fixed #19445 -- Skip admin fieldsets validation when the ModelAdmin.get_form() method is overridden.
2013-02-02 14:53:46 -08:00
Aymeric Augustin
ace9d4efc3
Made ungettext_lazy usable for messages that do not contain the count.
...
Fixed #19160 (again). Thanks Alexey Boriskin.
2013-02-02 10:58:31 +01:00
Aymeric Augustin
db5049c9f7
Fixed the test introduced in 2ca37af6
under Python 3.
2013-02-02 10:42:01 +01:00
Ramiro Morales
2ca37af621
Added test to demonstrate issue 11387 isn't there anymore.
...
Thanks adurdin for the report and patch. Fixes #11387 .
2013-02-01 23:30:50 -03:00
Ramiro Morales
c4b6659269
Added test to demonstrate issue 11263 isn't there anymore.
...
Thanks veena for the report and jaklaassen for the patch. Fixes #11263 .
2013-02-01 23:30:50 -03:00
Claude Paroz
04141c525d
Fixed #19663 -- Allowed None in colorize() text parameter
...
Thanks Jonathan Liuti for the report and the initial patch, and
Simon Charette for the review.
2013-02-01 22:53:18 +01:00
Matt Robenolt
393c268e72
Fixed #19715 -- Simplified findstatic output when verbosity set to 0
2013-02-01 11:55:05 +01:00
Simon Charette
339944491c
Renamed inspectdb field names for clarity
2013-02-01 09:16:29 +01:00
Claude Paroz
7bbd17bf20
Fixed #19341 -- Detected NullBooleanField when introspecting models
...
Thanks Tim Bowden for the report.
2013-01-31 20:55:00 +01:00
Claude Paroz
3c0a81aaf0
Fixed #19709 -- Fixed TimeField introspection on MySQL
...
Thanks Eugene Grachev for the report.
2013-01-31 20:41:57 +01:00
Claude Paroz
eb03fe1642
Added introspection tests for most of Django model fields
2013-01-31 20:41:57 +01:00
Ramiro Morales
7947c9e3a6
Deprecated undocumented warnings manipulation testing tools.
2013-01-31 14:57:45 -03:00
Aymeric Augustin
9a4a1ce323
Fixed #19708 -- Exception in timezone.override(None).
...
Thanks rafales.
2013-01-31 16:01:50 +01:00
Aymeric Augustin
89cb771be7
Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.
...
Thanks Tim for the report and initial patch.
2013-01-31 13:54:40 +01:00
Aymeric Augustin
3895ebc734
Added file forgotten in 23e319d7
.
2013-01-30 22:11:53 +01:00
Aymeric Augustin
23e319d729
Fixed #19076 -- Added content_type attribute to TemplateView.
...
Thanks Gavin Wahl.
2013-01-30 21:26:17 +01:00
Aymeric Augustin
3f1a0c0040
Fixed #19160 -- Made lazy plural translations usable.
...
Many thanks to Alexey Boriskin, Claude Paroz and Julien Phalip.
2013-01-30 20:28:16 +01:00
Ramiro Morales
47ddd6a408
Fixed #19552 -- Enhanced makemessages handling of ``{# #}``-style template comments.
...
They are simply ignored now. This allows for a more correct behavior when
they are placed before translatable constructs on the same line.
Previously, the latter were wrongly ignored because the former were
preserved when converting template code to the internal Python-syntax
form later fed to xgettext but Python has no ``/* ... */``-style
comments.
Also, special comments directed to translators are now only taken in
account when they are located at the end of a line. e.g.::
{# Translators: ignored #}{% trans "Literal A" %}{# Translators: valid, associated with "Literal B" below #}
{% trans "Literal B" %}
Behavior of ``{% comment %}...{% endcomment %}``tags remains unchanged.
Thanks juneih at redpill-linpro dot com for the report and Claude for
his work on the issue.
2013-01-29 19:13:23 -03:00
Tim Graham
ee26797cff
Fixed typos in docs and comments
2013-01-29 10:55:55 -07:00
Claude Paroz
f7394d2c32
Added HTML5 url input type
...
Refs #16630 .
2013-01-28 22:11:00 +01:00
Claude Paroz
4f16376274
Added HTML5 email input type
...
Refs #16630 .
2013-01-28 22:10:50 +01:00
Aymeric Augustin
c47fa3b481
Fixed #19676 -- Supported 'self' foreign keys in inspectdb.
...
Thanks Georgy Kutsurua for the report and Simon Charette for the patch.
2013-01-28 10:21:07 +01:00
Aymeric Augustin
f46d7314b5
Fixed #19677 -- Introspection of recursive foreign keys under SQLite.
...
Thanks Simon Charette.
2013-01-28 10:17:56 +01:00
Claude Paroz
4b3f7110ae
Fixed #16123 -- Ensured strptime receive proper string type
...
strptime generates an UnicodeEncodeError when using a non-ascii
unicode string on Python 2.
2013-01-26 20:53:09 +01:00
Aymeric Augustin
6605ac331a
Fixed #17158 -- Used a non-ambiguous representation of SQL queries
...
when a correct representation cannot be obtained.
2013-01-26 17:51:44 +01:00
Aymeric Augustin
55416e235d
Fixed #19589 -- assertRegexpMatches is deprecated in Python 3.3.
2013-01-26 13:47:11 +01:00
Aymeric Augustin
424eb67867
Fixed validation of email addresses when the local part contains an @.
...
See also BaseUserManager.normalize_email -- it uses rsplit.
Refs #4833 .
2013-01-26 12:20:57 +01:00
Claude Paroz
ebb504db69
Moved has_changed logic from widget to form field
...
Refs #16612 . Thanks Aymeric Augustin for the suggestion.
2013-01-25 20:50:46 +01:00
Ramiro Morales
ce27fb198d
Revert "Patch by Claude for #16084."
...
This reverts commit 2babab0bb3
.
2013-01-25 13:58:37 -03:00
Ramiro Morales
2babab0bb3
Patch by Claude for #16084 .
2013-01-25 13:23:33 -03:00
Claude Paroz
b9c8bbf372
Fixed #19665 -- Ensured proper stderr output for Command.run_from_argv
...
Thanks Stefan Koegl for the report and Simon Charette for the review.
2013-01-25 14:56:41 +01:00
Ramiro Morales
57d439e2d4
More i18n makemessages tests tweaks.
2013-01-24 07:51:14 -03:00
Claude Paroz
9893fa12b7
Fixed #19125 -- The startproject command should validate the name earlier
...
Thanks Łukasz Rekucki for the report and the patch.
2013-01-24 09:26:13 +01:00
Nick Sandford
93e79b45bc
Fixed #17416 -- Added widgets argument to inlineformset_factory and modelformset_factory
2013-01-24 08:58:17 +01:00
Ramiro Morales
456f9b9847
Simplified a i18n test.
2013-01-21 23:22:18 -03:00
Claude Paroz
8ce1e392fa
Fixed error introduced when testing patch for 013db6ba85
...
Shame on me.
2013-01-21 22:42:47 +01:00
Claude Paroz
013db6ba85
Fixed #18051 -- Allowed admin fieldsets to contain lists
...
Thanks Ricardo di Virgilio for the report, Mateus Gondim for the
patch and Nick Sandford for the review.
2013-01-21 22:34:36 +01:00
Claude Paroz
c6e0dedbdb
Fixed #19637 -- Ensured AdminEmailHandler fails silently
...
Thanks lsaffre for the report. Refs #19325 .
2013-01-21 20:32:36 +01:00
Anssi Kääriäinen
7aa538357c
Cleaned up testing models.py added for earliest()
...
The main cleanup was removal of non-necessary __unicode__ method. The
tests didn't break on py3 as the string representation was never used
in the tests.
Refs #17813 . Thanks to Simon Charette for spotting this issue.
2013-01-20 08:53:45 +02:00
Nick Sandford
fe54377dae
Fixed #17813 -- Added a .earliest() method to QuerySet
...
Thanks a lot to everybody participating in developing this feature.
The patch was developed by multiple people, at least Trac aliases
tonnzor, jimmysong, Fandekasp and slurms.
Stylistic changes added by committer.
2013-01-20 06:39:35 +02:00
Craig Blaszczyk
6158c79dbe
Made (make|compile)messages commands accept multiple locales at once.
...
Thanks Craig Blaszczyk for the initial patch. Refs #17181 .
2013-01-17 00:53:17 -03:00
Ramiro Morales
295650bd01
Simplified i18n commands tests.
2013-01-17 00:35:46 -03:00
Ramiro Morales
248aee1606
Modified makemessages so it creates .pot files once per invocation.
...
It creates a `locale/django.pot` file once instead of one
`locale/<locale_code>/django.pot` file for every locale involved.
Thanks Michal Čihař for the report and patch.
2013-01-16 20:48:06 -03:00
Ramiro Morales
eee865257a
Fixed #17008 -- Added makemessages option to not remove .pot files.
...
Thanks airstrike for the report and initial patch, Julien for an
enhanced patch and Jannis for reviewing.
2013-01-16 20:29:06 -03:00
Aymeric Augustin
50a985b09b
Fixed #19099 -- Split broken link emails out of common middleware.
2013-01-15 17:41:45 +01:00
Alex Gaynor
984e91e28f
Removed some uses of the deprecated assertEquals
2013-01-15 07:51:33 -08:00
David Cramer
a7ed09d13d
Improve test to ensure that post_delete was actually called
2013-01-14 13:34:55 -08:00
David Cramer
6045efa029
Move signal disconnect into finally block
2013-01-14 13:15:47 -08:00
David Cramer
272de9eb6b
Send post_delete signals immediately
...
In a normal relational construct, if you're listening for an event
that signals a child was deleted, you dont expect that the parent
was deleted already.
This change ensures that post_delete signals are fired immediately
after objects are deleted in the graph.
2013-01-14 13:15:47 -08:00
Claude Paroz
0171ba65db
Fixed #17574 -- Implemented missing get_key_columns in PostgreSQL backend
2013-01-12 21:46:08 +01:00
Claude Paroz
bcdb4898ca
Fixed #19488 -- Made i18n_patterns redirect work with non-slash-ending paths
...
Thanks Daniel Gerzo for the report and the initial patch.
2013-01-11 21:27:51 +01:00
Claude Paroz
f08e739bc2
Fixed #19585 -- Fixed loading cookie value as a dict
...
This regression was introduced by the 'unicode_literals' patch.
2013-01-11 21:09:33 +01:00
Claude Paroz
4e2e8f39d1
Fixed #4833 -- Validate email addresses with localhost as domain
2013-01-11 20:45:46 +01:00
Nick Sandford
eb6c107624
Fixed #19360 -- Raised an explicit exception for aggregates on date/time fields in sqlite3
...
Thanks lsaffre for the report and Chris Medrela for the initial
patch.
2013-01-11 18:10:28 +01:00
Claude Paroz
2e55cf580e
Adapted test assertion against yaml dump
...
Fixes #12914 (again).
2013-01-11 17:52:53 +01:00
Loic Raucy
62f842e2e5
Fixed #19581 -- ensure unique html ids with CheckboxSelectMultiple widgets
...
ID check is now done the same way as MultipleHiddenInput.
2013-01-09 16:06:56 -08:00
Florian Apolloner
ce580dd8ea
Fixed lockups in jenkins, refs #19546 .
2013-01-09 23:32:51 +01:00
Claude Paroz
e6949373b0
Skipped deprecation warning test on Python 2.6
...
Refs #19546 . On Python 2.6, DeprecationWarnings are visible by
default.
2013-01-09 20:02:09 +01:00
Preston Holmes
cfa70d0c94
Fixed #19546 - ensure that deprecation warnings are shown during tests
...
refs #18985
2013-01-09 08:19:22 -08:00
Anssi Kääriäinen
55da775ce1
Fixed #17541 -- Fixed non-saved/nullable fk querying
2013-01-08 21:02:38 +02:00
Claude Paroz
34ee7d9875
Updated deprecated test assertions
2013-01-08 19:08:15 +01:00
Anssi Kääriäinen
23ca3a0194
Fixed #16759 -- Remove use of __deepcopy__ in qs.clone()
...
The original problem was that queryset cloning was really expensive
when filtering with F() clauses. The __deepcopy__ went too deep copying
_meta attributes of the models used. To fix this the use of
__deepcopy__ in qs cloning was removed.
This commit results in some speed improvements across the djangobench
benchmark suite. Most query_* tests are 20-30% faster, save() is 50%
faster and finally complex filtering situations can see 2x to order
of magnitude improvments.
Thanks to Suor, Alex and lrekucki for valuable feedback.
2013-01-08 19:17:13 +02:00
Claude Paroz
c698c55966
Created special PostgreSQL text indexes when unique is True
...
Refs #19441 .
2013-01-07 17:54:30 +01:00
Anssi Kääriäinen
69a46c5ca7
Tests for various emptyqs tickets
...
The tickets are either about different signature between qs.none() and
qs or problems with subclass types (either EmptyQS overrided the custom
qs class, or EmptyQS was overridden by another class - values() did
this).
Fixed #15959 , fixed #17271 , fixed #17712 , fixed #19426
2013-01-06 19:18:29 +02:00
Anssi Kääriäinen
a2396a4c8f
Fixed #19173 -- Made EmptyQuerySet a marker class only
...
The guarantee that no queries will be made when accessing results is
done by new EmptyWhere class which is used for query.where and having.
Thanks to Simon Charette for reviewing and valuable suggestions.
2013-01-06 19:18:28 +02:00
Claude Paroz
b740da3504
Fixed #19192 -- Allowed running tests with dummy db backend
...
Thanks Simon Charette for the initial patch, and Jan Bednařík for
his work on the ticket.
2013-01-04 13:55:20 +01:00
Claude Paroz
ffa50ca352
Fixed #19382 -- Stopped smtp backend raising exception when already closed
...
Thanks Sebastian Noack for the report and the initial patch.
2013-01-03 20:41:45 +01:00
Claude Paroz
1b3f832ab7
Fixed #19134 -- Allowed closing smtp backend when the server is stopped
...
Thanks Sebastian Noack for the report and the initial patch.
2013-01-03 18:49:00 +01:00
Simon Charette
3fc43c964e
Fixed #19545 -- Make sure media/is_multipart work with empty formsets
2013-01-03 15:16:23 +01:00
Aymeric Augustin
a7b7efe78d
Minor fixes in the known_related_objects tests.
...
* Fixed JSON indentation.
* Avoided relying on implicit ordering.
2013-01-02 22:21:46 +01:00
Aymeric Augustin
07fbc6ae0e
Fixed #19547 -- Caching of related instances.
...
When &'ing or |'ing querysets, wrong values could be cached, and crashes
could happen.
Thanks Marc Tamlyn for figuring out the problem and writing the patch.
2013-01-02 22:21:46 +01:00
Aymeric Augustin
feb41c3246
Modernized middleware tests.
...
* Used override_settings consistently -- changes to DEBUG could leak.
* Took advantage of assertRaisesRegexp.
* Fixed indentation -- some code was indented at 2 spaces.
2013-01-01 23:00:34 +01:00
Anton Baklanov
3aa4b8165d
Fixed #19457 -- ImageField size detection failed for some files.
...
This was caused by PIL raising a zlib truncated stream error since we fed
the parser with chunks instead of the whole image.
2013-01-01 11:54:56 +01:00
Aymeric Augustin
bacb097ac3
Fixed #19519 again -- Regression in LiveServerTestCase after fd1279a4
.
2013-01-01 10:14:11 +01:00
Julien Phalip
9180146d21
Fixed #19453 -- Ensured that the decorated function's arguments are obfuscated in the @sensitive_variables decorator's frame, in case the variables associated with those arguments were meant to be obfuscated from the decorated function's frame.
...
Thanks to vzima for the report.
2012-12-31 09:34:08 -08:00
Aymeric Augustin
acc5396e6d
Fixed #19519 -- Fired request_finished in the WSGI iterable's close().
2012-12-31 12:47:34 +01:00
Claude Paroz
d11038acb2
Fixed #19537 -- Made CheckboxInput._has_changed handle 'False' string
...
Thanks dibrovsd@gmail.com for the report.
2012-12-31 10:18:59 +01:00
Julien Phalip
cee40c7d79
Added further flexibility to ModelAdmin for controlling post-save redirections.
...
Refs #19505 .
2012-12-30 21:33:21 -08:00
Aymeric Augustin
4e5369a596
Silenced warnings in the tests of deprecated features.
2012-12-29 22:32:07 +01:00
Aymeric Augustin
ef017a5f00
Advanced pending deprecation warnings.
...
Also added stacklevel argument, fixed #18127 .
2012-12-29 21:59:07 +01:00
Aymeric Augustin
2ecf56ea3f
Removed legacy ways of calling cache_page.
2012-12-29 21:59:07 +01:00
Aymeric Augustin
9f9a4cdecd
Removed truncate_words and truncate_html_words.
2012-12-29 21:59:07 +01:00
Aymeric Augustin
4a6490a4a0
Removed HttpRequest.raw_post_data.
2012-12-29 21:59:07 +01:00
Aymeric Augustin
d1c72d9e01
Removed django.core.management.setup_environ and execute_manager.
2012-12-29 21:59:07 +01:00
Aymeric Augustin
f27a4ee327
Removed django.contrib.localflavor.
...
Each localflavor lives on as a separate app.
2012-12-29 21:59:06 +01:00
Aymeric Augustin
052271168b
Removed django.contrib.databrowse.
...
RIP -- you served us well.
2012-12-29 21:58:12 +01:00
Aymeric Augustin
02f3daadd6
Removed interpolation of post_url_continue in the admin.
2012-12-29 21:58:12 +01:00
Aymeric Augustin
fb9f1b9bfb
Removed backwards-compatibility shim for #16288 .
...
Also unit-tested django.utils.log.RequireDebugTrue for consistency.
2012-12-29 21:58:12 +01:00
Anssi Kääriäinen
13a2b11425
Avoided having an indexed TextField installed unless using postgres
...
An index on TextField results in a warning message when running tests
on MySQL or SQLite, and the test using the TextField was PostgreSQL
only in any case.
2012-12-29 16:30:17 +02:00
Anssi Kääriäinen
ba4331f177
Fixed autopk issue in tests
2012-12-29 16:25:24 +02:00
Aymeric Augustin
e9c24bef74
Fix #19524 -- Incorrect caching of parents of unsaved model instances.
...
Thanks qcwxezdas for the report. Refs #13839 .
2012-12-28 23:34:54 +01:00
Aymeric Augustin
db278c3bf9
Fixed #19525 -- Reverted dcd4383107
and 05d333ba3b
.
...
Refs #9893 , #18515 .
Thanks Russell for the report.
2012-12-27 09:37:57 +01:00
Ramiro Morales
ad769efa85
Expanded tests added when fixing #14529 .
...
To make sure changes in 35d1cd0
don't break anything. Refs #19505 .
2012-12-24 17:48:48 -03:00
Aymeric Augustin
1c8be95a86
Prevented caching of streaming responses.
...
The test introduced in 4b278131
accidentally passed because of a
limitation of Python < 3.3.
Refs #17758 , #7581 .
2012-12-24 20:28:07 +01:00
Julien Phalip
35d1cd0b28
Fixed #19505 -- A more flexible implementation for customizable admin redirect urls.
...
Work by Julien Phalip.
Refs #8001 , #18310 , #19505 . See also 0b908b92a2
.
2012-12-24 15:44:19 -03:00
Aymeric Augustin
e8f07f0378
Fixed a randomly failing test under Python 3.
...
Refs #17758 .
2012-12-24 11:25:58 +01:00
Luke Plant
1ae64e96c1
Fixed a dependence on set-ordering in tests
2012-12-24 01:33:44 +00:00
Luke Plant
c31c2c92b8
Made admin generated changelist URLs independent of dict ordering
2012-12-24 01:33:24 +00:00
Ian Clelland
b9fc70141a
Don't rely on dictionary ordering in tests
2012-12-24 00:45:58 +00:00
Ian Clelland
585aa11d23
Use HTML parser to compare html snippets
2012-12-24 00:26:09 +00:00
Ian Clelland
8d35fd4c32
Use new TestCase methods for equality comparisons
2012-12-24 00:24:14 +00:00
Aymeric Augustin
1e4a27d087
Fixed #19468 -- Decoded request.path correctly on Python 3.
...
Thanks aliva for the report and claudep for the feedback.
2012-12-22 13:32:39 +01:00
Anssi Kääriäinen
d407164c04
Fixed #18854 -- Join promotion in disjunction cases
...
The added promotion logic is based on promoting any joins used in only
some of the childs of an OR clause unless the join existed before the
OR clause addition.
2012-12-20 21:45:15 +02:00
Anssi Kääriäinen
3dcd435a0e
Fixed #19500 -- Solved a regression in join reuse
...
The ORM didn't reuse joins for direct foreign key traversals when using
chained filters. For example:
qs.filter(fk__somefield=1).filter(fk__somefield=2))
produced two joins.
As a bonus, reverse onetoone filters can now reuse joins correctly
The regression was caused by the join() method refactor in commit
68847135bc
Thanks for Simon Charette for spotting some issues with the first draft
of the patch.
2012-12-20 21:27:00 +02:00
Russell Keith-Magee
c04c03daa3
Fixed #19401 -- Ensure that swappable model references are case insensitive.
...
This is necessary because get_model() checks are case insensitive, and if the swapable check isn't, the
swappable logic gets tied up in knots with models that are partially swapped out.
Thanks to chris@cogdon.org for the report and extensive analysis, and Preston for his work on the draft patch.
2012-12-20 16:10:19 +08:00
Patryk Zawadzki
3989ce52ef
Fixed #18172 -- Made models with __iter__ usable in ModelMultipleChoiceField
...
Thanks to Patryk Zawadzki for the patch.
2012-12-19 22:51:12 +02:00
Andrew Godwin
b62e82365a
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/models/loading.py
django/db/models/options.py
2012-12-18 09:02:07 +00:00
Claude Paroz
55972ee5c7
Fixed #19441 -- Created PostgreSQL varchar index when unique=True
...
Thanks Dylan Verheul for the report and Anssi Kääriäinen for the
review.
2012-12-18 09:56:30 +01:00
Anssi Kääriäinen
85712a5355
Made sure connections are actually closed in backends tests
2012-12-16 23:26:16 +02:00
Claude Paroz
ed711c4bd5
Fixed #19483 -- Improved import error message in contrib.comments
...
Thanks Valentin Lorentz for the report and the suggested fix.
2012-12-16 21:12:45 +01:00
Anssi Kääriäinen
69597e5bcc
Fixed #10790 -- Refactored sql.Query.setup_joins()
...
This is a rather large refactoring. The "lookup traversal" code was
splitted out from the setup_joins. There is now names_to_path() method
which does the lookup traveling, the actual work of setup_joins() is
calling names_to_path() and then adding the joins found into the query.
As a side effect it was possible to remove the "process_extra"
functionality used by genric relations. This never worked for left
joins. Now the extra restriction is appended directly to the join
condition instead of the where clause.
To generate the extra condition we need to have the join field
available in the compiler. This has the side-effect that we need more
ugly code in Query.__getstate__ and __setstate__ as Field objects
aren't pickleable.
The join trimming code got a big change - now we trim all direct joins
and never trim reverse joins. This also fixes the problem in #10790
which was join trimming in null filter cases.
2012-12-16 17:23:26 +02:00
Russell Keith-Magee
9facca28b6
Corrected tests depending on the error message on the AuthenticationForm.
...
Refs #19368 , and the fix introduced in 27f8129d64
.
2012-12-16 07:18:45 +08:00
Anssi Kääriäinen
7eba5fbc02
Fixed a couple of stale tests caused by patch for #19462
...
Commit was 088d3bc2f8
2012-12-13 15:02:08 +02:00
Anssi Kääriäinen
088d3bc2f8
Fixed #19462 -- Made assertQuerysetEqual detect undefined ordering
...
If there are more than one values to compare against and the qs isn't
ordered then assertQuerysetEqual will raise a ValueError.
2012-12-13 13:33:11 +02:00
Claude Paroz
6ed6a18a03
Fixed #19432 -- Provided better error message for get_object_or_404
...
Thanks Kit Sunde for the report and Brian Holdefehr for the initial
patch.
2012-12-12 22:05:00 +01:00
Florian Apolloner
7e97f4f510
Fixed an order dependant test failure.
2012-12-11 16:25:47 +01:00
Florian Apolloner
1eb0da1c5b
Fixed a test failure in the comment tests.
2012-12-10 23:34:51 +01:00
Florian Apolloner
27560924ec
Fixed a security issue in get_host.
...
Full disclosure and new release forthcoming.
2012-12-10 22:11:40 +01:00
Florian Apolloner
a2f2a39956
Fixed #18856 -- Ensured that redirects can't be poisoned by malicious users.
2012-12-10 22:11:39 +01:00
Claude Paroz
0cdfa76e68
Amended an SQL test fixture to not include an id value
...
Some backends might need special handling for auto-increment values.
This was introduced in 5fa5621f57
. Thanks Michael Manfre for spotting
the issue.
2012-12-10 17:49:04 +01:00
Aymeric Augustin
49519328b4
Fixed #19392 -- Improved error for old-style url tags with dashes.
...
Thanks dloewenherz for the report.
2012-12-09 16:17:56 +01:00
Claude Paroz
8248d14029
Removed US localflavor-specific tests from core
...
Also fixes #9045 .
2012-12-08 21:07:59 +01:00
Claude Paroz
04e6542b5a
Fixed #19423 -- Prevented ModelAdmin sharing widgets due to formfield_overrides
...
Thanks joebuyer at manycycles.com for the report and Simon Charette
for the review.
2012-12-08 12:41:11 +01:00
Claude Paroz
c91667338a
Fixed #19357 -- Allow non-ASCII chars in filesystem paths
...
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-12-08 11:13:52 +01:00
Andreas Hug
66dfcc10b3
Fixed #18574 -- Make BaseFormSet.is_valid call its underlying forms' is_valid
...
Thanks Simon Charette for the report and the initial patch.
2012-12-06 20:00:56 +01:00
Claude Paroz
34dcf51e06
Fixed #19367 -- Fixed saving ContentFile in filesystem storage
...
This was not working properly when ContentFile was initialized with
an unicode string.
Thanks Alexey Boriskin for the report and the test.
2012-12-06 17:14:44 +01:00
Marc Aymerich
553838a285
Fixed #19429 -- Applied linebreaksbr to read-only fields in inlines
...
Applied to inlines what ec9d6b1122
did for main fieldsets.
2012-12-06 09:52:02 +01:00
Anssi Kääriäinen
632cf32b43
Fixed #19391 -- Oracle specific failure in tests
...
The failure was caused by using None as a choice for a CharField. To
avoid Oracle's "" <-> NULL handling the field type was changed to
IntegerField.
2012-12-04 22:49:02 +02:00
Julien Phalip
c196e01100
Fixed the admin_filters tests for Postgres.
2012-12-04 10:36:56 -08:00
Claude Paroz
795ac7deda
Fixed #19378 -- Ensured get_success_url returns a non-lazy URL
2012-12-04 13:22:42 +01:00
Andrew Godwin
501c7a221c
Merge pull request #573 from tominsam/master
...
Fixed #19070 : urlize template filter raises exception in some cases
2012-12-04 02:18:10 -08:00
Ramiro Morales
b64d30405a
Fixed #18697 -- Made values accepted for two customizable admin templates consistent.
...
Thanks and at cloverfastfood dot com for the report.
2012-12-04 01:13:01 -03:00
Sebastián Magrí
88e1715639
Fixed #19318 -- Ensured that the admin's SimpleListFilter options can be displayed as selected even if the lookup's first element is not a string.
2012-12-03 11:53:15 -08:00
Claude Paroz
5fa5621f57
Fixed #19416 -- Fixed multi-line commands in initial SQL files
...
Thanks Aymeric Augustin for detecting this regression.
2012-12-03 20:47:08 +01:00
Tom Insam
161cafb6f6
another failing test case for square brackets.
2012-12-03 12:11:32 +00:00
Aymeric Augustin
baae4b8187
Fixed #19397 -- Crash on binary files in project templates.
...
Thanks gw 2012 at tnode com for the report.
2012-12-03 10:45:18 +01:00
Julien Phalip
2e2c4968f6
Fixed #17050 -- Added some CSS class names to the admin index pages to facilitate per-app or per-model style customizations. Thanks to scytale for the report and to H0ff1 and thiderman for their work on the patch.
2012-12-02 20:54:34 -08:00
Claude Paroz
349c4c37f8
Fixed #19015 -- Add ISO input formats to all formats
2012-12-01 14:05:52 +01:00
Claude Paroz
0eeae15056
Fixed #19354 -- Do not assume usermodel.pk == usermodel.id
...
Thanks markteisman at hotmail.com for the report.
2012-11-29 21:45:43 +01:00
Anssi Kääriäinen
163b471e9e
Converted a couple of assertEquals -> assertEqual
2012-11-28 23:44:50 +02:00
Tai Lee
6ebf115206
Fixed #14694 -- Made ``defer()`` work with reverse relations
...
Reverse o2o fields are now usable with defer.
2012-11-28 18:17:10 +02:00
Danilo Bargen
c10aaa70a4
Fixed #19370 -- Made date filter properly handle midnight value
2012-11-27 21:24:16 +01:00
Anssi Kääriäinen
64f6e0370a
Made some tests behave nicer re connection handling
2012-11-27 19:47:20 +02:00
Aymeric Augustin
2ea80b94d7
Fixed #19362 -- Detected invalid use of @python_2_unicode_compatible.
...
Thanks m3wolf for the report and akaariai for reproducing the problem.
2012-11-27 09:45:37 +01:00
Edward Tjörnhammar
29d59a879e
Fixed #17911 -- Ensure that admin readonly fields' display values are shown in change forms when the raw value is None.
2012-11-25 23:13:30 +01:00
Julien Phalip
ae206d78f6
Fixed #17646 -- Added a get_list_filter() method to ModelAdmin. Thanks to rasca for the suggestion and to mateusgondim for the patch.
2012-11-25 20:39:23 +01:00
Claude Paroz
f26b956e80
Fixed test failure following capitalization fix in 2f035a972
2012-11-25 19:54:38 +01:00
Aymeric Augustin
7644800070
Change exception type to reduce confusion.
...
TemplateSyntaxError is expected at compile time, not at run time.
Refs #19280 .
2012-11-25 19:51:42 +01:00
Aymeric Augustin
f89901dc05
Fixed two typos.
2012-11-25 19:31:53 +01:00
Claude Paroz
a5d47415f4
Enabled SimpleTestCase to be decorated by override_settings
...
Refs #18417 . Also fixed some test case classes which subclassed
the wrong parent.
2012-11-25 19:06:17 +01:00
Claude Paroz
9f7cefd505
Fixed #18417 -- Raised exception when unittest.TestCase is decorated with override_settings
2012-11-25 19:06:17 +01:00
Aymeric Augustin
d266919584
Fixed #19280 -- Raised an explicit exception for the old {% url %} syntax.
2012-11-24 22:10:51 +01:00
Aymeric Augustin
690cac3a34
Used a django.test.TestCase for compatibility with @override_settings.
...
These tests were silently skipped.
2012-11-24 22:10:51 +01:00
Anssi Kääriäinen
dc569c8801
Fixed ordering-related failure in m2m_through_regress tests
2012-11-24 16:03:21 +02:00
Chris Khoo
bf1871d874
Fixed #19237 -- Improved strip_tags utility
...
The previous pattern didn't properly addressed cases where '>'
was present inside quoted tag content.
2012-11-24 12:16:52 +01:00
Russell Keith-Magee
18d7c1ea3a
Simplified the deletions performed by the swappable_models test.
...
This is required to allow the test to run without error under SQLite in the CI environment.
2012-11-24 15:07:50 +08:00
Russell Keith-Magee
c8985a8a73
Fixed #19806 -- Ensure that content types and permissions aren't created for swapped models.
...
Thanks to rizumu for the report.
2012-11-24 13:43:20 +08:00
Anssi Kääriäinen
0a0a0d66b3
Fixed #19351 -- SQLite bulk_insert of more than 500 single-field objs
2012-11-24 01:13:12 +02:00
Anssi Kääriäinen
a27582484c
Fixed SQLite's collapsing of same-valued instances in bulk_create
...
SQLite used INSERT INTO tbl SELECT %s UNION SELECT %s, the problem
was that there should have been UNION ALL instead of UNION.
Refs #19351
2012-11-24 01:12:17 +02:00
Anssi Kääriäinen
90b86291d0
Fixed #18375 -- Removed dict-ordering dependency for F-expressions
...
F() expressions reuse joins like any lookup in a .filter() call -
reuse multijoins generated in the same .filter() call else generate
new joins. Also, lookups can now reuse joins generated by F().
This change is backwards incompatible, but it is required to prevent
dict randomization from generating different queries depending on
.filter() kwarg ordering. The new way is also more consistent in how
joins are reused.
2012-11-23 19:53:04 +02:00
Aymeric Augustin
2875b5dcab
Tweak a test to avoid hitting a limit with SQLite.
...
Django cannot delete more than 999 objects at a time with SQLite.
Refs #16426 , #16039 .
2012-11-23 10:02:18 +01:00
Tim Graham
0e3690d230
Fixed #18974 - Warned against using models.permalink
...
Thanks dstufft for the draft patch.
2012-11-22 16:08:51 -05:00
Aymeric Augustin
a026e480da
Fixed #16039 -- Made post_syncdb handlers multi-db aware.
...
Also reverted 8fb7a90026
. Refs #17055 .
2012-11-22 20:53:59 +01:00
George Hickman
ea6b95dbec
Fixed #19316 -- Set View args/kwargs/request before dispatch
2012-11-22 20:13:01 +01:00
Jannis Leidel
3fb83729b9
Merge branch 'ticket_19325' of https://github.com/hannesstruss/django into hannesstruss-ticket_19325
2012-11-22 10:05:08 +01:00
Julien Phalip
693b8a65ad
Modified a staticfiles test to use a unicode character that has just one single representation. The previously used character (ş) has two different representations (u'\u015f' and u's\u0327'), which caused spurious failures when the tests were run across multiple platforms (e.g. on a Linux VM hosted on a Mac).
2012-11-21 09:52:09 +01:00
Claude Paroz
b781354ad1
Updated assertions in pagination test
...
assertEquals is a deprecated assertion alias.
2012-11-21 09:06:21 +01:00
Chris Beaven
48e8b5e944
Add orphans support to MultipleObjectMixin
...
Fixes #7005
2012-11-21 16:50:23 +13:00
Chris Beaven
fbfa654a15
Paginator._get_page hook
...
This allows for Paginator subclasses to easily override the Page class
that gets used.
Took the opportunity to also do some non-invasive PEP8 tidying of the
paginator module.
2012-11-21 15:19:44 +13:00
Hannes Struss
f9891f2087
Fixed #19325 - Made email backend of AdminEmailHandler configurable
2012-11-20 11:23:12 +01:00
Preston Holmes
edf7ad36fa
Fixed #18658 -- Improved ModelAdmin.message_user API
...
Thanks to Lowe Thiderman for the patch and tests
2012-11-19 16:03:09 -08:00
Jannis Leidel
778b8bdcf4
Merge pull request #467 from tomchristie/page-kwarg
...
Add 'page_kwarg' attribute to `MultipleObjectMixin`, removing hardcoded "page".
2012-11-17 12:27:01 -08:00
Claude Paroz
e0363c688d
Fixed #19114 -- Fixed LogEntry unicode representation
...
Thanks niko at neagee.net for the report and Emil Stenstrom for
the patch.
2012-11-17 19:19:59 +01:00
Claude Paroz
2a67374b51
Fixed #19036 -- Fixed base64 uploads decoding
...
Thanks anthony at adsorbtion.org for the report, and johannesl for
bringing the patch up-to-date.
2012-11-17 17:25:21 +01:00
Claude Paroz
ec9d6b1122
Fixed #19226 -- Applied linebreaksbr to read-only fields in admin
...
Thanks shadow for the report, and Melevir and thiderman for the
patch.
2012-11-17 17:06:24 +01:00
Jannis Leidel
f79013843d
Fixed typo introduced in 4a5e8087ac
.
2012-11-17 16:00:19 +01:00
Jannis Leidel
233f86443c
Merge pull request #490 from gabrielhurley/reverse-prefix-special-chars
...
Fixed #18210 -- Escaped special characters in reverse prefixes.
2012-11-17 06:49:18 -08:00
Jannis Leidel
4a5e8087ac
Fixed #19136 -- Properly escape gettext context prefixes in the i18n JavaScript view template.
2012-11-17 15:37:30 +01:00
Preston Holmes
44046e8a38
Fixed #18985 -- made DeprecationWarnings loud
...
Capture warnings in Python >= 2.7 and route through
console handler, which is subject to DEBUG==True
Thanks to dstufft for the idea, and claudep for initial patch
2012-11-16 17:07:38 -08:00
Anssi Kääriäinen
71e14cf3aa
Fixed #18347 -- Removed autofield raw SQL inserts from tests
2012-11-15 17:31:08 +02:00
Anssi Kääriäinen
f51e409a5f
Fixed #13781 -- Improved select_related in inheritance situations
...
The select_related code got confused when it needed to travel a
reverse relation to a model which had different parent than the
originally travelled relation.
Thanks to Trac aliases shauncutts for report and ungenio for original
patch (committed patch is somewhat modified version of that).
2012-11-15 17:15:21 +02:00
Claude Paroz
550ddc66b4
Fixed #19272 -- Fixed gettext_lazy returned type on Python 2
...
Thanks tyrion for the report.
2012-11-14 10:50:15 +01:00
Claude Paroz
1620c27936
Fixed #19186 -- Fixed sending mail with unicode content on Python 3
...
Thanks alex_po for the report and Luke Plant for the analysis.
2012-11-14 10:43:33 +01:00
Aymeric Augustin
4c5cea7073
Merge pull request #218 from mgrouchy/ticket_18582
...
Fixed #18582 -- Added a no-op close to BaseCache
2012-11-11 07:18:45 -08:00
Claude Paroz
34162698cc
Fixed #14264 -- Ensured settings.configure configures logging
...
Thanks Matt McDonald for the patch.
2012-11-10 12:05:58 +01:00
Sean Breant
4d817b3887
Fixed #19262 -- Support cookie pickling in SimpleTemplateResponse
...
Refs #15863 .
2012-11-09 21:07:53 +01:00
Claude Paroz
1b307d6c8f
Fixed #19261 -- Delayed Queryset evaluation in paginators
...
Thanks trbs for the report and the patch.
2012-11-09 19:41:57 +01:00
Claude Paroz
45802e1248
Merged pagination tests
...
It is simpler/cleaner to have all pagination tests in a single file.
Refs #16122 .
2012-11-08 11:07:16 +01:00
Anssi Kääriäinen
cafb266954
Fixed #17144 -- MySQL again groups by PK only
...
Thanks to Christian Oudard for the report and tests.
2012-11-08 00:56:32 +02:00
Claude Paroz
79dd751b0b
Fixed #14315 -- Made memcached backend handle negative incr/decr values
...
Thanks Michael Manfre for the report and initial patch and
Tobias McNulty for the review.
2012-11-06 12:22:42 +01:00
Claude Paroz
78f66691ee
Fixed #8627 -- Prevented textareas to swallow first newline content
...
Browsers consider the first newline in textareas as some display
artifact, not real content. Hence they are not sending it back to
the server. If we want to keep initial newlines, we have to add one
when we render the textarea.
Thanks bastih for the report and initial patch.
2012-11-05 20:27:06 +01:00
Preston Holmes
6bd61194d4
Fixed py3 compatibility for 5a00a57aa5
2012-11-04 23:38:41 -08:00
Anton I. Sipos
fdea2621cd
Fixed #18949 -- Fix broken test interactions in ModelForms tests
...
A test in Model Forms test was specifically referring to a fixed
primary key, which was now being used up in a newly committed.
This has been worked around by specifying a higher primary
key.
2012-11-04 18:43:11 -08:00
Alex Gaynor
4d766b3c9a
Merge pull request #495 from aisipos/ticket_18949
...
Fixed #18949 -- Improve performance of model_to_dict with many-to-many
2012-11-04 15:57:45 -08:00
Anton I. Sipos
e44ab5bb4f
Fixed #18949 -- Improve performance of model_to_dict with many-to-many
...
When calling model_to_dict, improve performance of the generated SQL by
using values_list to determine primary keys of many to many objects. Add
a specific test for this function, test_model_to_dict_many_to_many
Thanks to brian for the original report and suggested fix.
2012-11-04 15:52:05 -08:00
Preston Holmes
5a00a57aa5
Fixed #19240 -- include pagination error details in ListView 404
...
Thanks to seawolf for the patch
2012-11-04 15:52:00 -08:00
Mike Johnson
fcd3d4c68f
model_split: Fixed #19236 - fixed error for abstract models with a split method
2012-11-04 13:43:54 -08:00
Alex Gaynor
4285571c5a
Fixed #5805 -- it is now possible to specify multi-column indexes. Thanks to jgelens for the original patch.
2012-11-04 10:16:06 -08:00
Aymeric Augustin
973f539ab8
Fixed #15152 -- Avoided crash of CommonMiddleware on broken querystring
2012-11-03 21:28:33 +01:00
Gabriel Hurley
90e530978d
Fixed #18210 -- Escaped special characters in reverse prefixes.
...
Ensured that special characters passed in to reverse via the
prefix argument are properly escaped so that calls to
django.utils.regex_helpers.normalize and/or string formatting
operations don't result in exceptions.
Thanks to toofishes for the error report.
2012-11-03 13:06:57 -07:00
Aymeric Augustin
095eca8dd8
Fixed #19101 -- Decoding of non-ASCII POST data on Python 3.
...
Thanks Claude Paroz.
2012-11-03 13:03:15 +01:00
Ulrich Petri
ac2052ebc8
Fixed #17549 -- Added a clickable link for URLFields in admin change list.
2012-11-03 11:57:33 +01:00
Tim Graham
feaf9f279a
Fixed #15361 - Documented performance considerations for QuerySet.get()
...
Thanks mmcnickle for the patch.
2012-11-02 17:58:24 -04:00
Andrew Godwin
7f75460fd6
Fixed #19070 -- urlize filter no longer raises exceptions on 2.7
...
Thanks to claudep for the patch.
2012-10-31 10:58:14 +00:00
Anssi Kääriäinen
68847135bc
Removed dupe_avoidance from sql/query and sql/compiler.py
...
The dupe avoidance logic was removed as it doesn't seem to do anything,
it is complicated, and it has nearly zero documentation.
The removal of dupe_avoidance allowed for refactoring of both the
implementation and signature of Query.join(). This refactoring cascades
again to some other parts. The most significant of them is the changes
in qs.combine(), and compiler.select_related_descent().
2012-10-31 08:19:44 +02:00
Claude Paroz
73245b3285
Prevented file_upload tests to leave files behind
...
Refs #19206 .
2012-10-30 22:27:55 +01:00
Claude Paroz
9a02851340
Fixed #17744 -- Reset default file storage with setting_changed signal
2012-10-30 22:23:28 +01:00
Claude Paroz
6de6988f99
Fixed #5076 -- Properly decode POSTs with non-utf-8 payload encoding
...
Thanks daniel at blogg.se for the report and Aymeric Augustin for
his assistance on the patch.
2012-10-30 09:00:32 +01:00
Claude Paroz
d30516e163
Prevented leftover files and dirs in admin_scripts tests
2012-10-29 19:08:07 +01:00
Luke Plant
4c4d08502c
Fixed #17991 - prefetch_related fails with GenericRelation and varchar ID field
...
Thanks to okke@formsma.nl for the report, and carmandrew@gmail.com for the tests.
2012-10-29 14:31:54 +00:00
Claude Paroz
f1cc2be0c5
Fixed #18575 -- Empty DATABASES should default to dummy backend
...
Thanks delormemarco@gmail.com for the report.
2012-10-28 23:44:03 +01:00
Aymeric Augustin
b4420d9602
Fixed #18964 -- floatformat test passes under py3k
...
Thanks Russell for the report.
2012-10-28 19:57:03 +01:00
Anssi Kääriäinen
611c4d6f1c
Fixed #18823 -- Ensured m2m.clear() works when using through+to_field
...
There was a potential data-loss issue involved -- when clearing
instance's m2m assignments it was possible some other instance's
m2m data was deleted instead.
This commit also improved None handling for to_field cases.
2012-10-28 17:31:35 +02:00
Anssi Kääriäinen
a5152bb646
Marked a test as expectedFailure on Oracle
2012-10-27 18:34:18 +03:00
Anssi Kääriäinen
2249bd275c
Fixed Oracle failure for "%" in table name
2012-10-27 05:26:42 +03:00
Aymeric Augustin
789ea3342d
Fixed comment_test tests under hash randomization.
...
Thanks clelland for the patch.
2012-10-26 22:47:45 +02:00
Aymeric Augustin
46d27a6b8d
Fixed feedgenerator tests under hash randomization
2012-10-26 22:40:35 +02:00
Aymeric Augustin
195bc37f1d
Fixed httpwrappers tests under hash randomization
2012-10-26 22:09:48 +02:00
Claude Paroz
be29329ccd
Fixed #16820 -- Treated '0' value as True for checkbox inputs
...
Thanks Dan Fairs for the report and the initial patch.
2012-10-26 20:44:00 +02:00
Andrew Godwin
6a632e0457
Merge branch 'master' into schema-alteration
...
Conflicts:
django/db/backends/__init__.py
django/db/models/fields/related.py
django/db/models/options.py
2012-10-26 08:41:13 +01:00
Luke Plant
fabe9c9e5f
Fixed test failure under Python 2.x introduced in 3e10d22df5
2012-10-26 02:45:15 +01:00
Luke Plant
3e10d22df5
Fixed test failures on Python 3.3 due to dict ordering assumptions.
...
Refs #19038
2012-10-26 02:13:09 +01:00