Commit Graph

10707 Commits

Author SHA1 Message Date
Claude Paroz e8f1395f4e [1.7.x] Added a bunch of missing unicode_literals
Refs #22564.
Backport of 12474dace from master.
2014-05-06 09:14:03 +02:00
Ben Davis 549b658241 [1.7.x] Fixed #22570 -- Made Form.__getitem__ KeyError more descriptive.
Backport of df60db0e78 from master
2014-05-05 20:02:14 -04:00
Anssi Kääriäinen 76979a257d [1.7.x] Fixed #22466 -- ordering by reverse foreign key
Ordering by reverse foreign key was broken by custom lookups patch
(commit 20bab2cf9d).

Thanks to everybody who helped solving this issue. Special thanks to
Trac alias takis for reporting this.

Backport of 3b7c66a3ac from master
2014-05-05 15:29:24 +03:00
Jakub Roztocil 4b6ba2c1d1 [1.7.x] Fixed #22489 -- missing implemenation for search lookup
When custom lookups were added, converting the search lookup to use
the new Lookup infrastructure wasn't done.

Some changes were needed to the added test, main change done by
committer was ensuring the test works on MySQL versions prior to 5.6.

Backport of 7131e14d00 from master
2014-05-05 14:40:06 +03:00
Anssi Kääriäinen 402fc4f6c9 [1.7.x] Fixed #22429 -- Incorrect SQL when using ~Q and F
Backport of 5e1f4656b9 from master
2014-05-05 13:06:51 +03:00
Tim Graham f8fa735dc2 [1.7.x] Fixed #22435 -- Prevented adding a ManyToManyField from prompting for a default.
Thanks andrewsg for the report.

Backport of 3818d96426 from master
2014-05-02 20:53:39 -04:00
Claude Paroz 61fd00d4fd [1.7.x] Fixed #22565 -- Prevented pgettext_lazy crash with bytestring input
Thanks ygbo for the report.
Backport of 142c27218 from master.
2014-05-02 19:33:58 +02:00
Chris Beaven 5ab93bbe74 [1.7.x] Fix migration autodector to work correctly with custom deconstructed values 2014-05-02 15:12:42 +12:00
Yehonatan Daniv d56267ba57 [1.7.x] Fixed #22539 -- Copied exclude argument in Model.full_clean() to prevent side effects.
Backport of e2e4cdba11 from master
2014-05-01 09:30:49 -04:00
Tim Graham e5941ba5f3 [1.7.x] flake8 fixes.
Backport of 45c2d1f5d9 from master.
2014-04-30 18:35:40 -04:00
Andrew Godwin 6ca5367869 [1.7.x] Cleanup failing test w/contenttypes and remove useless graph load 2014-04-30 15:12:18 -07:00
Andrew Godwin 35c2a14a49 [1.7.x] Fixed #22485: Include all unmigrated apps in project state by default. 2014-04-30 12:26:11 -07:00
Simon Charette a6ecd5dbb3 [1.7.x] Fixed #19195 -- Allow explicit ordering by a relation `_id` field.
Thanks to chrisedgemon for the report and shaib, akaariai and
timgraham for the review.

Backport of 24ec9538b7 from master
2014-04-30 14:26:39 -04:00
Claude Paroz 1084456ac2 [1.7.x] Fixed #22474 -- Made migration recorder aware of multiple databases
Thanks Tim Graham for the review.
Backport of 7c54f8cce from master.
2014-04-30 16:55:12 +02:00
Tim Graham a2cac1b68d [1.7.x] Removed unused import.
Backport of d9c272b22f from master
2014-04-30 07:27:56 -04:00
Bruno Ribeiro da Silva 72493b1b7c [1.7.x] Fixed #22511 -- Added args to migrations management commands.
Backport of 83413c53d2 from master
2014-04-30 07:20:44 -04:00
Simon Charette f02f20a739 [1.7.x] Use the new implementation of `six.with_metaclass`.
No more `NewBase` horrors.

Thanks to bendavis78 for his work on merging this into six.

Backport of a2340ac6d6 from master
2014-04-29 10:55:36 -04:00
Ramiro Morales 62bbfba3aa [1.7.x] Removed bogus, ineffective 'U' flag from codecs.open() call.
2df7238512 from master.
2014-04-29 07:52:43 -03:00
Tim Graham 1d20693fa6 [1.7.x] Revert "Fixed #15179 -- middlewares not applied for test client login()"
This reverts commit 4fdd51b732.

See the ticket for concerns with this implementation; it will be revisited.

Backport of aabceadd7d from master
2014-04-28 18:49:24 -04:00
James Bennett edca57817f [1.7.x] Bump version number for 1.7 beta 3 bugfix release. 2014-04-28 15:46:13 -05:00
Alex Gaynor 996564df4d [1.7.x] Fix many many typos in comments throughout the codebase
Backport of 2bcb8bfc8d from master
2014-04-26 14:35:57 -04:00
Aymeric Augustin 3bb0f118ca [1.7.x] Fixed #3214 -- Stopped parsing SQL with regex.
Avoided introducing a new regex-based SQL splitter in the migrations
framework, before we're bound by backwards compatibility.

Adapted this change to the legacy "initial SQL data" feature, even
though it's already deprecated, in order to facilitate the transition
to migrations.

sqlparse becomes mandatory for RunSQL on some databases (all but
PostgreSQL). There's no API to provide a single statement and tell
Django not to attempt splitting. Since we have a more robust splitting
implementation, that seems like a good tradeoff. It's easier to add a
new keyword argument later if necessary than to remove one.

Many people contributed to both tickets, thank you all, and especially
Claude for the review.

Refs #22401.

Backport of 8b5b199 from master
2014-04-26 17:46:57 +02:00
Aymeric Augustin 6b38e48ba1 [1.7.x] Fixed #21166 -- Reset errors_occurred flag after commit and rollback.
Backport of 3033a71 from master.

Conflicts:
	django/db/backends/__init__.py
2014-04-25 22:52:51 +02:00
Tim Graham 6d87acc390 [1.7.x] Fixed #22515 -- Fixed the object_id of the LogEntry that's created after a user password change in the admin.
Thanks ross at servercode.co.uk for the report.

Backport of 9e7f86b890 from master
2014-04-25 08:36:20 -04:00
Aymeric Augustin 782fa14db4 [1.7.x] Set some transaction-related feature flags on SQLite.
Refs #22496.

Backport of e368912 from master.
2014-04-25 11:45:58 +02:00
Shai Berger b8b179bbf5 [1.7.x] Fixed #22498 -- constraint name was not quoted in FK creation SQL
Backport of 843613add4 from master
2014-04-25 01:35:59 +03:00
Shai Berger 7421e1e320 [1.7.x] Made sure cursor.close() does not complain if cursor is already closed on Oracle
Refs #22483

Backport of 53d97e4fe3 from master
2014-04-25 01:35:38 +03:00
Aymeric Augustin 9bbb43dd1a [1.7.x] Ignored repeated calls to connection.close().
Backport of d4cc59ef from master
2014-04-24 08:43:24 +02:00
Aymeric Augustin 5cd6429620 [1.7.x] Prevented a crash in the cursor wrappers on Oracle.
Fixed #22483 (again).

Backport of 0f85103e from master
2014-04-24 08:43:16 +02:00
Aymeric Augustin e32e359d6a [1.7.x] Used the same instance of atomic for entry and exit.
Since all state is maintained on the connection at this time and none in
the atomic, it doesn't matter, but it could introduce some subtle bugs
if the implementation changed in the future.

Backport of 0aa4c6c3 from master
2014-04-23 21:45:49 +02:00
Aymeric Augustin 9bf890f6f9 [1.7.x] Wrapped migrations in a transaction only on DBs with transactional DDL.
Backport of e74d2183 from master
2014-04-23 21:45:38 +02:00
Claude Paroz 0424c84d54 [1.7.x] Set compile messages options as class variable
Refs #18714. Same logic as options for makemessages commands.
Backport of 3a435a057 from master.
2014-04-23 15:16:38 +02:00
Malcolm Box 07235aec9d [1.7.x] Fixed #22495 -- Locmem cache.add() failed with infinite timeouts
cache.add() incorrectly succeeded when there was an existing key
with an infinite (None) timeout.
Backport of af5f688392 from master.
2014-04-23 14:56:54 +02:00
Tim Graham e192f13103 [1.7.x] Fixed #22486 -- Restored the ability to reverse views created using functools.partial.
Regression in 8b93b31487.

Thanks rcoup for the report.

Backport of 3c06b2f2a3 from master
2014-04-23 08:49:53 -04:00
Claude Paroz c3228ef3e2 [1.7.x] Added Spatialite support to the new migration framework
Refs #22451.
Backport of 2ffa6ca73a from master.
2014-04-23 13:48:36 +02:00
Claude Paroz 423e2cf1ea [1.7.x] Used migration framework in GIS test tearDown
Backport of 48c4ea414 from master.
2014-04-23 13:47:49 +02:00
Claude Paroz 1d0f1ee199 [1.7.x] Fixed table cleanup in GIS migration tests
Backport of ab90c4707b from master.
2014-04-22 19:52:58 +02:00
Claude Paroz 417e9f383f [1.7.x] Fixed removal of GIS column in PostGIS 1.x migration
Refs #22481.
Backport of 2f9d1576e from master, squashed with 2f9d1576e8.
2014-04-22 19:52:58 +02:00
Claude Paroz 5c19c698b1 [1.7.x] Fixed adding new GIS column in PostGIS 1.x migration
Refs #22451.
Backport of fb09a489c from master.
2014-04-22 19:52:58 +02:00
Preston Timmons 935159d951 [1.7.x] Fixed #22478 -- Regression in test label discovery.
As part of the app-loading updates the old test runner was changed to not
require a models module. This introduced a regression in behavior so
applabel.TestCase failed for tests defined in a directory.

The fix is thanks to yakky and rtnpro.
2014-04-22 12:48:39 -04:00
Florian Apolloner 97b5833e21 [1.7.x] Fixed #22426 -- Added support old-style d.c.messages format.
Forward ported code from 1.5 that adds backwards compatibility with legacy message length.
See commit 9e7183073f for details.

Thanks to Ofir Ovadia for the initial patch.

Backport of f286721f7f from master.
2014-04-22 10:47:26 +02:00
James Bennett df81625da6 [1.7.x] Update for 1.7b2 security release. 2014-04-21 18:21:55 -05:00
Erik Romijn 34526c2f56 [1.7.x] Fixed queries that may return unexpected results on MySQL due to typecasting.
This is a security fix. Disclosure will follow shortly.

Backport of 75c0d4ea3a from master
2014-04-21 18:29:39 -04:00
Aymeric Augustin 380545bf85 [1.7.x] Prevented leaking the CSRF token through caching.
This is a security fix. Disclosure will follow shortly.

Backport of c083e3815a from master
2014-04-21 18:29:24 -04:00
Tim Graham 546740544d [1.7.x] Fixed a remote code execution vulnerabilty in URL reversing.
Thanks Benjamin Bach for the report and initial patch.

This is a security fix; disclosure to follow shortly.

Backport of 8b93b31487 from master
2014-04-21 18:29:12 -04:00
Aymeric Augustin 62eb79fc4c [1.7.x] Appeased flake8 2.1.0.
Backport of 428c0bbe1b from master
2014-04-21 07:50:50 -04:00
Alex Gaynor 50dddbdfc7 [1.7.x] Corrected many style guide violations that the newest version of flake8 catches
Backport of 778ce245dd from master
2014-04-21 07:50:43 -04:00
Simon Charette 33d1dc2eeb [1.7.x] Fixed flake8 warnings introduced in recent commits.
Backport of 79f05616fb from master
2014-04-20 13:10:52 -04:00
Tim Graham 9e86c3f0a6 [1.7.x] Fixed flake8 errors.
Backport of 471fb04a30 from master
2014-04-20 13:09:12 -04:00
Andrew Gorcester bc5d568e1e [1.7.x] Fixed #22397 -- Issues removing M2M field with explicit through model
Changed the migration autodetector to remove models last so that FK
and M2M fields will not be left as dangling references. Added a check
in the migration state renderer to error out in the presence of
dangling references instead of leaving them as strings. Fixed a bug
in the sqlite backend to handle the deletion of M2M fields with
"through" models properly (i.e., do nothing successfully).

Thanks to melinath for report, loic for tests and andrewgodwin and
charettes for assistance with architecture.

Backport of 956bd64424 from master
2014-04-18 18:34:00 -04:00