1
0
mirror of https://github.com/django/django.git synced 2025-03-14 11:20:46 +00:00

7173 Commits

Author SHA1 Message Date
Mariusz Felisiak
fbe8930745 [1.9.x] Fixed #25503 -- Fixed system check crash on ForeignKey to abstract model.
Backport of 914167abf19d16ac97c0f1f6ae1b08cb377c8f3a from master
2015-10-06 19:23:53 -04:00
Riccardo Magliocchetti
6f653f759a [1.9.x] Refs #12118 -- Allowed "mode=memory" in SQLite test database names.
Backport of 3543fec3b739864c52de0a116dde3b0e5e885799 from master
2015-10-06 12:33:21 -04:00
Tim Graham
6bc8bdf55a [1.9.x] Fixed #25496 -- Made ModelChoiceField respect prefetch_related().
Backport of 6afa6818fcf25665bbf61f0921c8c8c6fa8f223e from master
2015-10-05 19:19:09 -04:00
Pindi Albert
3429dfe11d [1.9.x] Fixed #25423 -- Made error message for unknown template tag more helpful.
Backport of 9f2881deb127593e8e0fa25e978aad9029d7b562 from master
2015-10-05 17:33:18 -04:00
Ben Kraft
63a1e912a7 [1.9.x] Fixed #25389 -- Fixed pickling a SimpleLazyObject wrapping a model.
Pickling a `SimpleLazyObject` wrapping a model did not work correctly; in
particular it did not add the `_django_version` attribute added in 42736ac8.
Now it will handle this and other custom `__reduce__` methods correctly.

Backport of 35355a4ffedb2aeed52d5fe3034380ffc6a438db from master
2015-10-03 13:01:08 -04:00
Tim Graham
59027a4cae [1.9.x] Fixed #25466 -- Added backwards compatibility aliases for LoaderOrigin and StringOrigin.
Thanks Simon Charette for the DeprecationInstanceCheck class.

Backport of 8d1a001ef6dcbbe8053da05cdb3ec99965b0953f from master
2015-09-29 19:20:11 -04:00
Antoine Catton
db88e40312 [1.9.x] Refs #16860 -- Fixed password help text when there aren't any validators.
This avoids creating an empty list which is invalid HTML 4.

Backport of 53ccffdb8c8e47a4d4304df453d8c79a9be295ab from master
2015-09-28 15:31:18 -04:00
Claude Paroz
fb901c82bf [1.9.x] Made tests/serializers/models.py a models package
Thanks Tim Graham for the patch series review.
Backport of 50acbf3ff6 from master.
2015-09-26 20:05:23 +02:00
Claude Paroz
df87de345d [1.9.x] Moved remaining of serializers_regress to serializers tests
Backport of 4908222ac from master.
2015-09-26 20:04:51 +02:00
Claude Paroz
b58f88f96d [1.9.x] Moved more serializers_regress to serializers tests
Backport of ddd6a530e from master.
2015-09-26 20:04:21 +02:00
Claude Paroz
a74728b36d [1.9.x] Separated natural key serialization tests
Backport of d59d3caf3 from master.
2015-09-26 20:03:54 +02:00
Claude Paroz
d31c38cddd [1.9.x] Separated JSON serialization tests
Backport of 6dc7af3e01 from master.
2015-09-26 20:03:26 +02:00
Claude Paroz
4eeec2031e [1.9.x] Separated XML serialization tests
Backport of d3cfdfb508 from master.
2015-09-26 20:03:00 +02:00
Claude Paroz
5452d39e01 [1.9.x] Separated YAML serialization tests
Backport of febd5aeec from master.
2015-09-26 20:02:25 +02:00
Tim Graham
ffcf81969b [1.9.x] Removed redundancy in admin_changelist tests.
Backport of c42123adb166fd297116880a5322e4e17b11e33f from master
2015-09-25 10:41:08 -04:00
Tzu-ping Chung
9581ac39a8 [1.9.x] Fixed #25457 -- Improved formatting of password validation errors in management command output.
Backport of 7372cdebed19a9d8e5527823c1e6825156babf98 from master
2015-09-24 19:45:48 -04:00
Simon Charette
8e8c0792c0 Refs #18081 -- Asserted db constraints are created for fk to proxy models. 2015-09-23 14:59:05 -04:00
Anton Baklanov
d0ed01cef0 Fixed #25407 -- Removed network dependency in GeoIP tests. 2015-09-23 13:11:57 -04:00
Tim Graham
6b37719616 Refs #24526 -- Made the django logger handle INFO messages.
Without an explicit 'level', only messages at WARNING or higher
are handled. This makes the config consistent with the docs
which say, "The django catch-all logger sends all messages at
the INFO level or higher to the console."
2015-09-23 11:33:49 -04:00
Tim Graham
7cb3a48843 Fixed #25410 -- Fixed empty ClearableFileInput crash on Python 2.
Reverted "Fixes #24727 -- Prevented ClearableFileInput from masking
exceptions on Python 2" and added a regression test.

This reverts commit 5c412dd8a724b263489c1bd7a2fea381460665d7.
2015-09-23 10:26:19 -04:00
Alex Hill
134ca4d438 Fixed #24509 -- Added Expression support to SQLInsertCompiler 2015-09-22 23:35:24 +10:00
Alasdair Nicol
f2975c021d Refs #23813 -- Moved URLconfs into module and tidied docstrings. 2015-09-21 20:10:33 -04:00
Nick Johnson
392f64842f Fixed #25373 -- Added warning logging for exceptions during {% include %} tag rendering. 2015-09-21 19:57:12 -04:00
Nick Johnson
85c52743f7 Refs #18773 -- Improved template variable exception logging message. 2015-09-21 19:27:01 -04:00
Aymeric Augustin
8bcff10b5a Fix import sorting problem. 2015-09-21 22:55:18 +02:00
Aymeric Augustin
91e9f1c972 Fixed #24921 -- set_autocommit(False) + ORM queries.
This commits lifts the restriction that the outermost atomic block must
be declared with savepoint=False. This restriction was overly cautious.

The logic that makes it safe not to create savepoints for inner blocks
also applies to the outermost block when autocommit is disabled and a
transaction is already active.

This makes it possible to use the ORM after set_autocommit(False).
Previously it didn't work because ORM write operations are protected
with atomic(savepoint=False).
2015-09-21 22:21:53 +02:00
Aymeric Augustin
e542e81b39 Renamed descriptor classes for related objects.
The old names were downright confusing. Some seemed to mean the opposite
of what the class actually did.

The new names follow a consistent nomenclature:

    (Forward|Reverse)(ManyToOne|OneToOne|ManyToMany)Descriptor.

I mentioned combinations that do not exist in the docstring in order to
help people who would search for them in the code base.
2015-09-21 22:20:42 +02:00
Claude Paroz
65a1055a36 Fixed #25431 -- Readded inline foreign keys to modelformset instances
Too much field exclusions in form's construct_instance() in _post_clean()
could lead to some unexpected missing ForeignKey values.
Fixes a regression from 45e049937. Refs #13776.
2015-09-21 21:30:49 +02:00
Jani Tiainen
fcf494b48f Fixed #24688 -- Added Oracle support for new-style GIS functions. 2015-09-21 13:52:14 -04:00
Alasdair Nicol
fe3fc5210f Fixed #23813 -- Added checks for common URL pattern errors
Thanks jwa and lamby for the suggestions, and timgraham and jarshwah
for their reviews.
2015-09-21 23:46:21 +10:00
Josh Smeaton
534aaf56f4 Fixed #24629 -- Unified Transform and Expression APIs 2015-09-21 19:56:24 +10:00
Claude Paroz
8dc3ba5ceb Removed obsolete supports_* auth backend attributes in tests 2015-09-20 12:16:28 +02:00
Raphael Merx
f5a33e4840 Fixed #25296 -- Prevented model related object cache pollution when create() fails due to an unsaved object. 2015-09-19 20:49:13 -04:00
Tim Graham
c21410aeeb Fixed typo in "pbkdf2" test names. 2015-09-19 20:44:37 -04:00
Alasdair Nicol
15ce1a735c Used more specific assertion in check_framework tests. 2015-09-19 18:35:05 -04:00
Aymeric Augustin
c3904deb91 Fixed #25160 (again) -- Moved data loss check on reverse relations.
Moved data loss check when assigning to a reverse one-to-one relation on
an unsaved instance to Model.save(). This is exactly the same change as
e4b813c but for reverse relations.
2015-09-19 20:27:53 +02:00
Unai Zalakain
a4b80e2421 Refs #13110 -- Fixed mistakes in the new multiple enclosure feed tests 2015-09-19 15:54:33 +02:00
Travis Jensen
1a09b3c398 Fixed #25424 -- Use force_str for test client URLs.
urlparse() fails with an AttributeError ("'__proxy__' object has no
attribute 'decode'") if reverse_lazy is used to look up the URL
(this is exactly the same problem that caused ticket #18776). The
solution is to use force_str() on the path before handing it to
urlparse().
2015-09-19 15:05:54 +02:00
Markus Holtermann
43f2eb7ef3 Fixed #25390 -- Allowed specifying a start migration in squashmigrations
Thanks Tim Graham for the review.
2015-09-19 14:55:34 +10:00
Markus Holtermann
5aa55038ca Fixed #24743, #24745 -- Optimized migration plan handling
The change partly goes back to the old behavior for forwards migrations
which should reduce the amount of memory consumption (#24745). However,
by the way the current state computation is done (there is no
`state_backwards` on a migration class) this change cannot be applied to
backwards migrations. Hence rolling back migrations still requires the
precomputation and storage of the intermediate migration states.

This improvement also implies that Django does not handle mixed
migration plans anymore. Mixed plans consist of a list of migrations
where some are being applied and others are being unapplied.

Thanks Andrew Godwin, Josh Smeaton and Tim Graham for the review as well
as everybody involved on the ticket that kept me looking into the issue.
2015-09-19 14:54:53 +10:00
fabrizio ettore messina
186eb21dc1 Fixed #25269 -- Allowed method_decorator() to accept a list/tuple of decorators. 2015-09-18 19:04:29 -04:00
sujayskumar
d8d853378b Fixed #24944 -- Added extra_email_context parameter to password_reset() view. 2015-09-18 18:56:04 -04:00
Unai Zalakain
aac2a2d2ae Fixed #13110 -- Added support for multiple enclosures in Atom feeds.
The ``item_enclosures`` hook returns a list of ``Enclosure`` objects which is
then used by the feed builder. If the feed is a RSS feed, an exception is
raised as RSS feeds don't allow multiple enclosures per feed item.

The ``item_enclosures`` hook defaults to an empty list or, if the
``item_enclosure_url`` hook is defined, to a list with a single ``Enclosure``
built from the ``item_enclosure_url``, ``item_enclosure_length``, and
``item_enclosure_mime_type`` hooks.
2015-09-18 18:31:58 -04:00
Simon Charette
71ebcb85b9 Fixed #25417 -- Added a field check for invalid default values. 2015-09-18 14:31:36 -04:00
Iulia Chiriac
75ed590032 Fixed #24636 -- Added model field validation for decimal places and max digits. 2015-09-18 14:30:20 -04:00
Thomas Orozco
d49667ef26 Refs #25422 -- Added a test for a template tag with type annotations.
This doesn't work in Django 1.8 but was fixed in Django 1.9 as a
side effect of another change.
2015-09-18 08:10:38 -04:00
Tom Christie
b02f08e02c Fixed #25034 -- Converted caches ImproperlyConfigured error to a system check. 2015-09-18 07:44:39 -04:00
Aric Coady
f33b3ebd53 Refs #20625 -- Forwardported tests and release notes for queryset chaining fix.
The issue was fixed on master due to the removal of ValuesQuerySet.

Partial forwardport of 7d471fe6626de2b36b97ac04086d8ea307be8288 from stable/1.8.x
2015-09-17 19:22:53 -04:00
Aymeric Augustin
4f6a7663bc Refs #14091 -- Fixed connection.queries on SQLite. 2015-09-17 23:01:33 +02:00
Tim Graham
fc8a6a9b00 Added a version requirement to mysqlclient in test requirements. 2015-09-17 15:07:26 -04:00