Commit Graph

11504 Commits

Author SHA1 Message Date
Tim Graham 0af4ddabf4 Fixed typos in comments. 2014-10-08 15:59:19 -04:00
Artem Rizhov ca61195827 Fixed #23555 -- Avoided suppressing IndexError in QuerySet.first() and .last() 2014-10-08 14:28:38 -04:00
Loic Bistuer ed37f7e979 Fixed #23611 -- update_or_create failing from a related manager
Added update_or_create to RelatedManager, ManyRelatedManager and
GenericRelatedObjectManager.
Added missing get_or_create to GenericRelatedObjectManager.
2014-10-08 03:27:31 +07:00
Jon Dufresne c1ef234e31 Fixed #23522 -- Changed reverse() to return a Unicode string; not bytes 2014-10-07 13:06:39 -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
Tim Graham 8121860be4 Revert "Improved AppRegistryNotReady message."
This reverts commit 6fa9fa91a5.

Aymeric: "I chose not to talk about django.setup() here on purpose.
This will hardly always be the correct solution."
2014-10-04 13:13:54 -04:00
Collin Anderson 6fa9fa91a5 Improved AppRegistryNotReady message. 2014-10-04 08:02:22 -04:00
Martin Matusiak ae5dbe5aa8 Fixed comment typo in django/template/__init__.py 2014-10-04 08:00:00 -04: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
Tim Graham 32c7d3c061 Fixed #15089 -- Allowed contrib.sites to lookup the current site based on request.get_host().
Thanks Claude Paroz, Riccardo Magliocchetti, and Damian Moore
for contributions to the patch.
2014-10-01 16:23:20 -04:00
Claude Paroz 3339605821 Added a dumpdata/loaddata test for geographic content 2014-10-01 21:31:35 +02:00
Seth Hill fe2afcd318 Fixed #23569 -- Allowed using configs besides dictConfig in LOGGING_CONFIG. 2014-09-30 17:13:27 -04:00
Claude Paroz d6a15026c4 Updated translations from Transifex
Forward port of e9c8aefbce from stable/1.7.x
2014-09-30 20:55:50 +02: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
Tim Graham 12809e1609 Fixed #23489 -- Added numpy 1.9+ support in template lookups 2014-09-29 19:51:39 -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 df578bf175 Added ordering to fix non-deterministic relatedapp test. 2014-09-29 08:53:44 -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
Aymeric Augustin caf5cd7ba7 Fixed #23436 -- Made BASE_DIR absolute in settings template.
This ensures consistency between Python 3.4+ and earlier versions.

Thanks Harry Percival for the report.
2014-09-28 13:33:29 +02:00
Claude Paroz e1fbb68e4e Updated comment about Python issue 2014-09-27 22:48:30 +02:00
Shai Berger a54adcecff Fixed git blunder, refs #22738 2014-09-27 09:57:09 +03: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 45840927d3 Silenced some deprecation warnings in contrib.sitemaps; refs #22384. 2014-09-27 00:42:47 +07: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
Claude Paroz d1ca70110f Factorized schema_editor() at BaseDatabaseWrapper level 2014-09-26 08:50:16 +02:00
Tim Graham a8f07530a7 Fixed #23537 -- Added Oracle GIS SchemaEditor.
Thanks Shai Berger for review.
2014-09-25 20:16:54 -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
Tim Graham 74e7f91e6d Fixed #23538 -- Added SchemaEditor for MySQL GIS.
Thanks Claude Paroz for suggestions and review.
2014-09-25 13:53:44 -04: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
Thomas Chaumeny 9f576dd54f Added tolerance in equality testing to avoid random build failure 2014-09-25 07:19:23 -04:00
Thomas Chaumeny ac2e7f08d8 Fixed use of assert* functions in some gis tests 2014-09-25 07:19:23 -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
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
Tim Graham a1709220d5 Added an Oracle workaround for a geogapp test; refs #23504. 2014-09-23 20:47:08 -04:00
Tim Graham 729cd6a11a Skipped a broken geoapp test on Oracle; refs #23504. 2014-09-23 19:51:14 -04: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
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
Claude Paroz b8cdc7dcc3 Made get_table_list return a TableInfo named tuple 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
Sergey Fedoseev 0bea6c8749 Factored create_fk_sql, create_unique_sql, and delete_constraint_sql. 2014-09-23 09:24:32 -04:00
Dejan Noveski 903d144d85 Fixed #23532 -- Fixed Macedonian locale date formats 2014-09-22 18:04:57 +02:00
Marc Tamlyn c6fd1e904c Fixed Oracle GIS gml() test failure introduced by e910340; refs #18757. 2014-09-22 13:10:03 +01:00
Loic Bistuer c9a53035d6 Generate GeoManager from GeoQuerySet. Refs #20625.
This cleanup lays the groundwork for #23533 and also addresses
the issue that GeoManager.get_queryset() failed to pass the
database router hints to the QuerySet constructor.

Thanks Anssi Kääriäinen for the review.
2014-09-22 17:18:08 +07: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 828edc5ba9 Skipped a broken GIS test on Oracle; refs #23504. 2014-09-19 15:03:55 -04:00
Tim Graham 7add30df01 Made a GIS test work on Oracle.
Thanks Josh Smeaton and Claude Paroz for advice.
2014-09-19 14:38:58 -04:00
Tim Graham 185ab9ffef Fixed Oracle GIS failures introduced by e9103402c0; refs #18757.
Thanks Marc Tamlyn for the patch.
2014-09-19 07:51:42 -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 4dcfacb5b9 Fixed string length check in LayerMapping 2014-09-18 18:56:31 +02:00
Tim Graham 7fc13178d6 Removed unnecessary order_by() from a GIS test that crashed Oracle.
Oracle cannot order_by() a TextField; refs #23504.
2014-09-18 12:42:55 -04:00
Damien Baty ad491ecc6e Fixed #23488 -- Added AnonymousUser.get_username(). 2014-09-18 10:48:28 -04:00
Tim Graham 8facb02faf Improved GIS migration test cleanup; refs #23504. 2014-09-18 09:00:55 -04:00
Tim Graham 33e817a6d8 Added feature flag for geometry_field_introspection; refs #22632 and #23504. 2014-09-18 07:32:51 -04:00
Tim Graham 6c1a0581ab Added a feature flag for add_srs_entry support; refs #22632 and #23504. 2014-09-18 07:28:05 -04:00
Tim Graham d8ee13789b Avoided a crash on an Oracle GIS test; refs #23504. 2014-09-17 17:35:11 -04:00
Tim Graham 7fce7f51ef Skipped some broken tests on Oracle GIS; refs #23504. 2014-09-17 15:33:50 -04: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
Josh Smeaton 0eb5cde9da Fixed #21775 -- Allowed customization of datafile for Oracle tablespace 2014-09-17 09:55:33 -04: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
Marc Tamlyn ed7821231b Fixed #19463 -- Added UUIDField
Uses native support in postgres, and char(32) on other backends.
2014-09-16 10:08:09 +01:00
valtron abcf28a076 Fixed #23474 -- Prevented migrating backwards from unapplying the wrong migrations. 2014-09-15 14:56:59 -04:00
Claude Paroz 6072f17d09 Factorized create_index_sql expression 2014-09-13 21:34:37 +02:00
Jason Hobbs e1424b2370 Fixed #23397 -- Stripped whitespace from base64 during chunking
This insures the actual base64 content has a length a multiple of 4.
Also added a test case for the failure.
2014-09-13 19:06:21 +02:00
Malte Beckmann 22bfc45146 Fixed #23466 -- Removed seconds from all locale time output formats. 2014-09-13 13:00:42 -04:00
José Padilla 5472d18e31 Fixed #23461 -- Added EMAIL_TIMEOUT setting 2014-09-13 09:33:21 -04:00
Carl Meyer afa119918c Fixed #23484 -- Add comment in AppConfigStub clarifying app name vs app label. 2014-09-12 15:45:08 -06:00
Szilveszter Farkas 5e32605ce9 Fixed #23483 -- Prevented ImproperlyConfigured with dotted app names
Made sure the app labels stay unique for the AppConfigStubs, so
migrations wouldn't fail if two dotted app names has the same last part
(e.g. django.contrib.auth and vendor.auth)
2014-09-12 14:58:54 -06:00
Tim Graham 52ef6a4726 Fixed #17101 -- Integrated django-secure and added check --deploy option
Thanks Carl Meyer for django-secure and for reviewing.

Thanks also to Zach Borboa, Erik Romijn, Collin Anderson, and
Jorge Carleitao for reviews.
2014-09-12 15:05:23 -04:00
Claude Paroz 8f334e55be Fixed #13843 -- Prevented AttributeError during geometry objects deletion 2014-09-12 20:45:59 +02:00
Claude Paroz b011afe6c8 Prevented Attribute error in GDAL objects deletion 2014-09-12 20:31:22 +02:00
Flavio Curella ce078ef976 Fixed #19139 -- Made OpenLayersWidget follow GeoModelAdmin's modifiable attribute
Thanks Tim Graham for the review.
2014-09-12 08:48:38 +02:00
Tim Graham 66580fe97c Fixed #23403 -- Fixed crash in contrib.sitemaps if lastmod returned a date rather than datetime.
Thanks igorcc for the report.
2014-09-11 16:09:23 -04:00
Tim Graham 9a5fe5b29f Added ordering to prevent non-deterministic test failure; refs #23099. 2014-09-10 13:30:04 -04:00
Tim Graham fbeb7979ee Avoided using deprecated version of importlib; refs #23418. 2014-09-10 13:07:40 -04:00
Tim Graham 96010ae15b Corrected indentation in a contrib.humanize test; refs #23340.
Thanks Zach Borboa for the report.
2014-09-10 12:26:15 -04:00
Andi Albrecht 00535e8e6b Fixed #20743 -- Added support for keyfile/certfile in SMTP connections.
Thanks jwmayfield, serg.partizan, and Wojciech Banaś for work on the patch.
2014-09-10 11:14:20 -04:00
Markus Bertheau 61f56e239f Corrected grammar in migrations error message. 2014-09-10 10:32:33 -04:00
Malte Beckmann 1ac32e76ac Fixed #23417 -- Completed locale formats for zh_CN, zh_Hans, zh_Hant and zh_TW. 2014-09-10 09:07:07 -04:00
Markus Holtermann 6d5958c7a3 Fixed #23452 -- Prevented infinite migrations for empty unique/index_together.
Thanks fwkroon for the report.
2014-09-10 07:54:16 -04:00
Tim Graham a4c23f70de Fixed flake8 warnings. 2014-09-09 20:57:26 -04:00
Duncan Parkes df7187d795 Fixed #23368 -- Overhauled the Welsh formats.py file.
The only debatable thing here is setting FIRST_DAY_OF_WEEK to 1.
The only examples of calendars I can find in Welsh start on Monday,
for example, the calendar on S4C (the only all Welsh TV station).

http://www.s4c.co.uk/clic/c_clicschedule.shtml
2014-09-09 20:48:33 -04:00
Claude Paroz b9d9287f59 Fixed urlize after smart_urlquote rewrite
Refs #22267.
2014-09-09 21:59:35 +02:00