Commit Graph

5901 Commits

Author SHA1 Message Date
Jon Dufresne c1ef234e31 Fixed #23522 -- Changed reverse() to return a Unicode string; not bytes 2014-10-07 13:06:39 -04:00
Browniebroke d1e87aebf7 Refactored model lookup tests; refs #18586. 2014-10-07 12:04:56 -04:00
Tim Graham 9dff5ce7c7 Fixed #23593 -- Fixed crash in AdminEmailHandler with non-ASCII characters in request.
Thanks edevil for the report and Simon Charette for review.
2014-10-06 17:35:53 -04:00
Carl Meyer 6f6e7d01dc Merge pull request #3308 from aericson/ticket_22064
Fixed #22064 -- Add check for related_name
2014-10-06 14:06:33 -06:00
Loic Bistuer ec2fd02bb3 Fixed #23594 -- Fixed deepcopy on ErrorList.
Thanks Troy Grosfield for the report and Tim Graham for the tests.
2014-10-07 00:09:55 +07:00
Markus Holtermann 2f16ff5a6c Fixed #23601 -- Ensured view exists in URLconf before importing it in admindocs. 2014-10-06 09:31:39 -04:00
Emmanuelle Delescolle a24cf21722 Fixed #23604 -- Allowed related m2m fields to be references in the admin.
Thanks Simon Charette for review.
2014-10-06 08:35:16 -04:00
André Ericson 1e5e2a4707 Fixed #22064 -- Add check for related_name
Validates that related_name is a valid Python id or ends with a '+' and
it's not a keyword. Without a check it passed silently leading to
unpredictable problems.

Thanks Konrad Świat for the initial work.
2014-10-04 20:47:26 -03:00
Jon Dufresne 8c581ff394 Fixed #23482 -- Added SingleObjectMixin.query_pk_and_slug
Enabling the attribute causes get_object() to perform its lookup
using both the primary key and the slug.
2014-10-02 15:42:30 -04:00
Markus Holtermann 85f6d89313 Fixed #23426 -- Allowed parameters in migrations.RunSQL
Thanks tchaumeny and Loic for reviews.
2014-10-02 11:52:40 -04:00
Seth Hill fe2afcd318 Fixed #23569 -- Allowed using configs besides dictConfig in LOGGING_CONFIG. 2014-09-30 17:13:27 -04:00
Tim Graham c7b5883c78 Fixed flake8 warnings. 2014-09-30 13:24:20 -04:00
Nick Sandford f5cfd09c25 Fixed #7361 -- Added cancel link to admin delete views. 2014-09-30 08:45:04 -04:00
Rudy Mutter a407b846b4 Fixed #23365 -- Added support for timezone-aware datetimes to migrations. 2014-09-29 20:45:43 -04:00
Thomas Chaumeny 311b3ad9db Fixed #23567 -- Made assertQuerysetEqual check Counter equality when ordered=False 2014-09-29 12:00:14 -04:00
Tim Graham 4b257cf261 Fixed flake8 warnings. 2014-09-29 08:13:40 -04:00
Thomas Chaumeny b2aad7b836 Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
Thanks Collin Anderson for the review.
2014-09-29 00:01:38 +07:00
Shai Berger c1ae0621ba Fixed #22738 -- made finer distinctions for when Boolean is not detected on Oracle
Thanks Claude Paroz for partial fix and Simon Charrette for review
2014-09-27 09:49:50 +03:00
Claude Paroz dbdae3a755 Fixed #22738 -- Abstracted boolean field type introspection
Thanks maxi for the report, Shai Berger for his help with the patch
and Tim Graham for the review.
2014-09-26 20:03:44 +02:00
Loic Bistuer b23d47412c Fixed #23560 -- Fixed MigrationWrite to handle builtin types without imports.
Thanks Tim Graham for the review.
2014-09-27 00:36:28 +07:00
Matt Robenolt ef5f9b6ae8 Fixed #23460 -- Added literal `%s` support to extra() QuerySets. 2014-09-26 13:01:27 -04:00
Thomas Chaumeny 17557d068c Fixed #8408 -- Added ModelAdmin.show_full_result_count to avoid COUNT() query.
Thanks lidaobing for the suggestion.
2014-09-26 12:12:40 -04:00
Markus Holtermann 45bd7b3bd9 Fixed #23455 -- Forced related_name to be a unicode string during deconstruction. 2014-09-25 17:49:44 -04:00
Davide Ceretti d8e157d5ab Refactored m2m_through tests. Refs #18586
Refactored old tests that were rewritten 1:1 from doctests.
2014-09-26 01:28:32 +07:00
Markus Holtermann 215aa4f53b Fixed #23415 -- Added fields for unmanaged and proxy model migrations.
Thanks sky-chen for the report.
2014-09-25 10:25:03 -04:00
Marco Buttu e077c29155 Fixed #23551 -- Fixed bash autocompletion crash on Python 3. 2014-09-25 07:44:22 -04:00
Tim Graham d7ab2cefb7 Revert "Fixed #23474 -- Prevented migrating backwards from unapplying the wrong migrations."
This reverts commit abcf28a076.
2014-09-24 15:49:30 -04:00
Tim Graham a4f23eba2e Fixed #23421 -- Corrected TEST SERIALIZE setting.
Thanks gkoller for the report.
2014-09-24 14:46:10 -04:00
Markus Holtermann b9a670b227 Fixed #23426 -- Don't require double percent sign in RunSQL without parameters 2014-09-24 07:20:57 -04:00
Tim Graham 0aca91cf7f Fixed flake8 warnings. 2014-09-24 06:32:42 -04:00
Justin Caratzas cf43a1ee90 Fixed #23539 -- Added get_extra(), get_max_num(), and get_min_num() hooks to GenericInlineModelAdmin. 2014-09-24 06:32:42 -04:00
Loic Bistuer 2f3a4cd573 Removed numbering from the models.py header of some test packages.
This is a reliqua from the early days of the modeltests/regressiontests era.
2014-09-24 17:28:56 +07:00
Shai Berger d128eac316 Changed Oracle test-user creation to grant privileges instead of roles
because the roles (specifically RESOURCE) are deprecated.
Also added optional support for creating views in tests, and made an
introspection test fail (rather than skip)  if a view cannot be created
due to lacking privileges.

Refs #18782

Thanks Tim Graham for review, and Josh Smeaton
2014-09-24 04:58:33 +03:00
Loic Bistuer e043aae9bb Fixed #23550 -- Normalized get_queryset() of RelatedObjectDescriptor
and ReverseSingleRelatedObjectDescriptor so they actually return QuerySet
instances.

Also ensured that SingleRelatedObjectDescriptor.get_queryset() accounts
for use_for_related_fields=True.

This cleanup lays the groundwork for #23533.

Thanks Anssi Kääriäinen for the review.
2014-09-24 02:03:12 +07:00
Loic Bistuer 1fd6e13bf2 Consolidated some many_to_one tests. 2014-09-24 02:03:12 +07:00
Claude Paroz 2a1bdf5ced Called table_names instead of get_table_list in migrations 2014-09-23 20:13:31 +02:00
Claude Paroz ed297061a6 Fixed #18782 -- Prevented sql_flush to flush views
Thanks rodolfo_3 for the report and the initial patch, and
Josh Smeaton, Shai Berger and Tim Graham for the reviews.
2014-09-23 20:13:31 +02:00
Sergey Fedoseev 463952d940 Fixed #23503 -- Fixed renaming of model with self-referential m2m field. 2014-09-23 10:03:37 -04:00
Sergey Fedoseev 83cd18633f Fixed #23065 -- Quoted constraint names in SQL generated by migrations. 2014-09-23 09:25:31 -04:00
Loic Bistuer 3c6ac0bab8 Consolidated some text utils into the utils_tests test package. 2014-09-23 19:45:59 +07:00
Loic Bistuer 0dab07e5da Merged custom_managers_regress into the custom_managers test package. 2014-09-23 03:56:19 +07:00
Loic Bistuer d42a45de40 Merged custom_columns_regress into the custom_columns test package. 2014-09-23 03:56:19 +07:00
Loic Bistuer 7fe554b2a3 Merged one_to_one_regress into the one_to_one test package. 2014-09-23 03:56:19 +07:00
Claude Paroz aeb48b9bc5 Fixed an i18n test with native string
Refs commit 11f307a5a8.
2014-09-21 17:28:37 +02:00
Yuri Kriachko 11f307a5a8 Fixed #23196 -- Short-circuited empty string translation
Translating an empty string used to return the gettext catalog
metadata instead of the empty string.
Thanks Ned Batchelder for the suggestion, Tim Graham for the review
and Anton Berezin and Claude Paroz for contributions to the patch.
2014-09-21 17:08:17 +02:00
Tim Graham 9d30412a5a Fixed some flake8 errors.
Originally I added migrations to flake8 exclude because of long lines
in migration files, but there are other directories named migrations we
do want to check. We are not warning on line lengths yet anyway.
2014-09-19 12:31:15 -04:00
Thomas Chaumeny e008a10c2f Fixed #23443 -- Corrected erroneous FieldError message.
Thanks Tim Graham for the review.
2014-09-19 01:01:31 +07:00
Claude Paroz abc11b0a33 Fixed #23514 -- Prevented queries in PostGISOperations init
Thanks Mattia Procopio for the report.
2014-09-18 20:00:35 +02:00
Claude Paroz fc2b8ddcc8 Fixed #23495 -- Stopped swallowing real settings import error
Thanks papaloizouc for the report.
2014-09-17 17:15:44 +02:00
Baptiste Mispelon d63ac5b595 Fixed #23492 -- Restored F.__deepcopy__.
This reverts commit 3a66035107.
A regression test was also added.
2014-09-16 12:19:00 +02:00