Commit Graph

6634 Commits

Author SHA1 Message Date
Tim Graham 95b1ae76ba [1.8.x] Refs #23763 -- Fixed SMTPServer Python 3.5 deprecation warning in mail test.
Backport of 7d97c5745e from master
2015-10-25 06:02:21 -04:00
Claude Paroz 244b7c930f [1.8.x] Fixed #25592 -- Fixed misnamed strictly_above PostGIS lookup
Fixes a regression from 2bd1bbc42. Thanks Daniel Wiesmann for the report
and Tim Graham for the review.
Backport of c08f85fd54 from master.
2015-10-22 20:35:54 +02:00
Tim Graham cf1038d8e3 [1.8.x] Fixed #25562 -- Skipped a time dependent admin_filters test on Windows.
Backport of 4a50daf6b3 from master
2015-10-19 20:27:41 -04:00
Simon Charette 71962629c0 [1.8.x] Fixed #25563 -- Cached deferred models in their proxied model's _meta.apps.
Thanks to Andriy Sokolovskiy for the report and Tim Graham for the review.

Backport of 3db3ab71e9 from master
2015-10-19 20:13:47 -04:00
Josh Smeaton 42e029f6c4 [1.8.x] Fixed #25517 -- Made Concat function idempotent on SQLite.
Backport of 6c95b134e9 from master
2015-10-17 15:58:17 -04:00
Tim Graham a8133e73a7 [1.8.x] Used SchemaEditor.delete_model() for teardown in schema tests.
Some third-party database backends (MSSQL) have custom
delete_model() requirements that must be executed.

Backport of 4dcc2a1955 from master
2015-10-16 09:34:38 -07:00
Antoine Catton ee6785ebea [1.8.x] Fixed #25506 -- Allowed filtering over a RawSQL annotation.
Co-Authored-By: Gavin Wahl <gwahl@fusionbox.com>

Backport of b971c1cd78 from master
2015-10-14 12:21:36 -07:00
Andriy Sokolovskiy eb85e6672a [1.8.x] Fixed #24156 -- Fixed inherited related name of ManyToManyField.
Fixed situation when parent abstract model declares related_name='+'
and child models had an invalid queryset.

Backport of f7b2978158 from master
2015-10-13 04:17:50 -07:00
Mariusz Felisiak 4ec96b776b [1.8.x] Fixed #25503 -- Fixed system check crash on ForeignKey to abstract model.
Backport of 914167abf1 from master
2015-10-06 19:26:00 -04:00
Riccardo Magliocchetti e2db171e15 [1.8.x] Refs #12118 -- Allowed "mode=memory" in SQLite test database names.
Backport of 3543fec3b7 from master
2015-10-06 12:33:24 -04:00
Tim Graham de570d4da9 [1.8.x] Fixed #25496 -- Made ModelChoiceField respect prefetch_related().
Backport of 6afa6818fc from master
2015-10-05 19:25:21 -04:00
Ben Kraft c03f0c282d [1.8.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 35355a4ffe from master
2015-10-03 13:03:05 -04:00
Marco Fucci 0e2d3b9304 [1.8.x] Fixed #24505 -- Fixed clash with hidden m2m fields.
Added support for multiple m2m fields with the same 'to' model
and with related_name set to '+'.

Backport of 4ee08958f1 from master
2015-09-30 18:38:49 -04:00
Aymeric Augustin 425c5e40ea [1.8.x] 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).

Backport of 91e9f1c from master
2015-09-21 22:31:13 +02:00
Claude Paroz 158b0a2837 [1.8.x] 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.

Backport of 65a1055a3 from master.
2015-09-21 21:50:11 +02:00
Aymeric Augustin 1abd177696 [1.8.x] 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.

Backport of c3904de from master
2015-09-19 20:28:22 +02:00
Aric Coady 7d471fe662 [1.8.x] Refs #20625 -- Fixed custom queryset chaining with values() and values_list(). 2015-09-17 19:20:09 -04:00
Tim Graham 4f0966e75f [1.8.x] Added a version requirement to mysqlclient in test requirements.
Backport of fc8a6a9b00 from master
2015-09-17 15:11:41 -04:00
Tim Graham 120be9b6c0 [1.8.x] Added a version requirement to python-memcached in test requirements.
Backport of 12a62e7e4b from master
2015-09-17 15:10:13 -04:00
Adam Chainz 3c2c74f58f [1.8.x] Fixed #25377 -- Changed Count queries to execute COUNT(*) instead of COUNT('*').
Backport of 3fe3887a2e from master
2015-09-14 14:07:32 -04:00
Ville Skyttä 69017bade0 [1.8.x] Fixed #25393 -- Fixed MySQL crash when adding text/blob field with unhashable default.
Backport of 4d933ad418 from master
2015-09-14 12:28:04 -04:00
Renato Oliveira f328ebdede [1.8.x] Fixed #25382 -- Removed obsolete references to DateQuerySet.
Backport of e3720b990a from master
2015-09-11 12:21:11 -04:00
Tim Graham 62347208bb [1.8.x] Fixed #24525 -- Fixed AssertionError in some complex queries.
Thanks Anssi Kääriäinen for providing the solution.

Backport of 2dc9ec5616 from master
2015-09-05 08:19:38 -04:00
Maxime Lorant 7dabaa8ee3 [1.8.x] Refs #25345 -- Updated links to code.google.com.
Backport of c92cd22d02 from master
2015-09-04 08:18:22 -04:00
Aymeric Augustin 2b08b36488 [1.8.x] Made the autoreloader survive all exceptions.
Refs #24704.

Backport of b79fc11d73 from master
2015-08-29 23:13:12 +02:00
Aymeric Augustin dc8786ce94 [1.8.x] Ensured gen_filenames() yields native strings.
This also fixes a test failure on Python 2 when Django is installed in a
non-ASCII path. This problem cannot happen on Python 3.

Backport of c2fcba2ac7 from master
2015-08-29 23:10:55 +02:00
Aymeric Augustin 6af1e47aab [1.8.x] Refactored autoreload tests.
* Added helpers to test uncached and cached access.
* Fixed test_project_root_locale: it duplicated test_locale_paths_setting.
* Rewrote test_only_new_files: test more cases.

Backport of dfa712efb8 from master
2015-08-29 23:09:57 +02:00
Aymeric Augustin b18bb65fd2 [1.8.x] Accounted for error files in the autoreloader.
* When some old files contain errors, the second call to
  gen_filenames() should return them.
* When some new files contain errors, the first call to
  gen_filenames(only_new=True) should return them.

Backport of 23620cb8e0 from master
2015-08-29 23:08:06 +02:00
Tim Graham 0d368bfb47 [1.8.x] Fixed #25323 -- Fixed selenium test failures with chromedriver 2.18.
Backport of 7ac0cd445e from master
2015-08-28 14:38:18 -04:00
Tim Graham 3cc67a637a [1.8.x] Fixed #25299 -- Fixed crash with ModelAdmin.list_display value that clashes with a model reverse accessor.
Backport of 9607a04041 from master
2015-08-28 09:03:34 -04:00
Claude Paroz c177d0690e [1.8.x] Fixed #25295 -- Restored 'no active translation' after language override
Thanks David Nelson Adamec for the report and Tim Graham for the review.
Backport of 9324935c3 from master.
2015-08-25 10:37:54 +02:00
Kai Richard Koenig 181528726e [1.8.x] Fixed #25040 -- Fixed migrations state crash with GenericForeignKey
Backport of 60f795c060 from master
2015-08-22 08:50:19 -04:00
Tim Graham 0e3a8c22df [1.8.x] Fixed typo in tests/migrations/test_autodetector.py.
Backport of 01966bb2a7 from master
2015-08-20 14:52:36 -04:00
Tim Graham ffe755e990 [1.8.x] Fixed #24951 -- Fixed AssertionError in delete queries involving a foreign/primary key.
Thanks Anssi Kääriäinen for help.

Backport of 333cbdcd2d from master
2015-08-20 08:46:08 -04:00
Tim Graham 2eb86b01d7 [1.8.x] Fixed DoS possiblity in contrib.auth.views.logout()
Thanks Florian Apolloner and Carl Meyer for review.

This is a security fix.
2015-08-18 08:15:15 -04:00
Caio Ariede 29fa1b5800 [1.8.x] Fixed #25180 -- Prevented varchar_patterns_ops and text_patterns_ops indexes for ArrayField.
Backport of dad8434d6f from master
2015-08-15 10:11:09 -04:00
Tim Graham 632a917c11 [1.8.x] Refs #23843 -- Updated Oracle annotations workaround to reflect latest status.
Backport of f9636fdf92 from master
2015-08-14 13:52:33 -04:00
Fabrizio Ettore Messina c652383379 [1.8.x] Fixed #25267 -- Corrected message for admin.E122 system check.
Backport of ece78684d9 from master
2015-08-13 13:14:17 -04:00
Tim Graham e4b813c0e7 [1.8.x] Fixed #25160 -- Moved unsaved model instance data loss check to Model.save()
This mostly reverts 5643a3b51b and
81e1a35c36.

Thanks Carl Meyer for review.

Backport of 5980b05c1f from master
2015-08-10 11:31:22 -04:00
Claude Paroz cda66497aa [1.8.x] Updated Wikipedia links to use https
Backport of 64982cc2fb from master.
2015-08-08 12:09:53 +02:00
mlavin ac46eb7e83 [1.8.x] Fixed #25231 -- Added recording of squashed migrations in the migrate command.
Ensured squashed migrations are recorded as applied when the
migrate command is run and all of the original migrations
have been previously applied.

Backport of 69db1c7455 from master
2015-08-07 18:16:37 -04:00
Tim Graham ad2ac53054 [1.8.x] Fixed #25233 -- Fixed HStoreField.has_changed() handling of initial values.
Thanks Simon Charette for review.

Backport of a7b7f27c05 from master
2015-08-07 14:31:05 -04:00
Curtis Maloney 473af19273 [1.8.x] Fixed #25215 -- Solved reference to forms.HStoreField in declaration of HStoreField
Correct test which was using the model field in a test form.

Backport of 9f73009e98 from master
2015-08-04 19:19:05 +10:00
Alasdair Nicol 7a8460191e [1.8.x] Fixed #25206 -- Fixed error message when checking a ModelAdmin fieldset's fields.
Backport of 8972818289 from master
2015-08-03 08:59:13 -04:00
Tim Graham 6bb8258255 [1.8.x] Fixed #25204 -- Added missing space in runserver logging.
Backport of 1a76257b1b from master
2015-08-01 08:31:32 -04:00
Adam Chainz b46dad1bef [1.8.x] Fixed #25176 -- Prevented TestCase.setUpTestData() exception from leaking transaction.
Backport of 0abb06930f from master
2015-08-01 07:38:20 -04:00
Claude Paroz 22e9c87bb8 [1.8.x] Updated GeoIP test for newer versions
Backport of 3f9dca62cb from master
2015-07-30 18:16:45 -04:00
Tim Graham 77566dcc6e [1.8.x] Fixed #25183 -- Fixed non-deterministic GeoIP test.
google.com doesn't always resolve to an IP inside the United States.

Backport of 5b6ca15073 from master
2015-07-30 18:12:37 -04:00
Matt Johnson 05c7129bf2 [1.8.x] Fixed #12768 -- Fixed QuerySet.raw() regression on FK with custom db_column.
Backport of e063ac2fae from master
2015-07-23 18:44:58 -04:00
Daniel Roseman 4cc0baa98e [1.8.x] Fixed #25079 -- Added warning if both TEMPLATES and TEMPLATE_* settings are defined.
Django ignores the value of the TEMPLATE_* settings if TEMPLATES is also
set, which is confusing for users following older tutorials. This change
adds a system check that warns if any of the TEMPLATE_* settings have
changed from their defaults but the TEMPLATES dict is also non-empty.

Removed the TEMPLATE_DIRS from the test settings file; this was marked
for removal in 1.10 but no tests fail if it is removed now.

Backport of 24620d71f2 from master
2015-07-13 17:55:19 -04:00