Commit Graph

15518 Commits

Author SHA1 Message Date
geekodour c6864a01b2 Fixed #28791 -- Allowed commands that don't require settings to work if the DJANGO_SETTINGS_MODULE doesn't exist. 2017-12-07 14:19:18 -05:00
Nick Pope c68f66e014 Refs #23919 -- Replaced super() calls for old-style classes. 2017-12-07 09:10:32 -05:00
Tim Graham a862af3839
Fixed #28893 -- Removed unnecessary dict.items() calls. 2017-12-06 17:17:59 -05:00
Sergey Fedoseev 183fb7b2b9 Fixed #28870 -- Added support for functools.partialmethod serialization in migrations. 2017-12-06 14:49:37 -05:00
Sergey Fedoseev b728ab22e1 Simplified BaseModelAdmin.lookup_allowed() a bit. 2017-12-06 23:54:51 +05:00
Tzu-ping Chung 85e6a1c634 Fixed #28877 -- Made ordinal template filter results more localizable.
Marked the whole pattern (e.g. "{value}th") as translatable, instead of
just this suffix, so that languages not using suffixes for ordinals can
use this tag.
2017-12-06 09:42:58 -05:00
Mariusz Felisiak fc48047586
Refs #28876 -- Fixed incorrect foreign key constraint name for models with quoted db_table.
Thanks Simon Charette and Tim Graham for the review and Carlos E. C.
Leite for the report.
2017-12-05 21:11:20 +01:00
Mariusz Felisiak f79d9a322c
Refs #28876 -- Fixed incorrect class-based model index name generation for models with quoted db_table.
Thanks Simon Charette and Tim Graham for the review and Carlos E. C.
Leite for the report.
2017-12-05 21:05:10 +01:00
Nick Pope e014f91a70 Fixed #28890 -- Removed newlines between MultiWidget's subwidgets.
Regression in b52c73008a.
2017-12-05 11:22:36 -05:00
Дилян Палаузов 87c76aa116 Fixed #28873 -- Used dict.setdefault() to set model and form field defaults. 2017-12-04 13:28:48 -05:00
Дилян Палаузов d2afa5eb23 Fixed #28860 -- Removed unnecessary len() calls. 2017-12-04 10:35:23 -05:00
Jozef 3d94ee8500 Simplified django.utils.cache.get_max_age(). 2017-12-04 08:57:55 -05:00
Tim Graham 81057645f6 Fixed #28871 -- Fixed initialization of autocomplete widgets in "Add another" inlines.
Also allowed autocomplete widgets to work on AdminSites with a name other
than 'admin'.
2017-12-01 22:14:32 -05:00
Simon Charette 095c1aaa89 Fixed #28849 -- Fixed referenced table and column rename on SQLite.
Thanks Ramiro for the input and Tim for the review.
2017-12-01 22:12:24 -05:00
Sergey Fedoseev cf12257db2 Fixed #28863 -- Fixed filter on annotation that contains Q. 2017-12-01 21:48:49 -05:00
Tim Graham c3e0adcad8 Fixed #28305 -- Fixed "Cannot change column 'x': used in a foreign key constraint" crash on MySQL with a sequence of AlterField or RenameField operations.
Regression in 45ded053b1.
2017-12-01 19:07:46 -05:00
Claude Paroz d6859a1489 Added Kabyle language
Forward port of bfc3fa3d3b from stable/2.0.x
2017-12-01 21:52:06 +01:00
Claude Paroz d0932ce8fc Updated contrib translations from Transifex
Forward port of 765e6de924 from stable/2.0.x
2017-12-01 21:51:30 +01:00
Claude Paroz b36ed9bf92 Updated core translations from Transifex
Forward port of e886205988 from stable/2.0.x
2017-12-01 21:50:49 +01:00
Vasiliy Bolshakov 03974d8122 Fixed #28866 -- Made InlineAdminFormSet include InlineModelAdmin's Media before its formset's Media.
This provides better backwards compatibility following refs #28377.
2017-11-30 20:15:28 -05:00
Simon Charette e50add6ca1 Fixed #28856 -- Fixed a regression in caching of a GenericForeignKey pointing to a MTI model.
Regression in b9f8635f58.
2017-11-30 09:28:44 -05:00
Mads Jensen f0a68c2511 Fixed #28702 -- Made query lookups for CIText fields use citext. 2017-11-29 10:35:37 -05:00
Simon Charette 78c5e7b90e Fixed #28834 -- Followed ancestor links on field cache lookup failure.
Thanks Tim for the review.
2017-11-29 01:28:39 -05:00
Nicolas Delaby 746caf3ef8 Fixed #28837 -- Fixed test client crash if an exception with more than one arg is raised.
Also removed usage of the problematic pattern elsewhere.

Regression in 6e55e1d88a.
2017-11-28 18:55:23 -05:00
Jon Dufresne 7a6fbf36b1 Fixed #28853 -- Updated connection.cursor() uses to use a context manager. 2017-11-28 11:28:09 -05:00
Дилян Палаузов 3308085838 Fixed #28854 -- Replaced type(True) with bool in sqlite's SchemaEditor. 2017-11-28 10:44:02 -05:00
Claude Paroz 4f5526e346 Fixed #28773 -- Forced pot files to use UNIX-style newlines
Thanks Hendy Irawan for the analysis and report.
2017-11-28 08:52:37 +01:00
Raphael Michel 616f468760 Fixed #28848 -- Fixed SQLite/MySQL crash when ordering by a filtered subquery that uses nulls_first/nulls_last. 2017-11-27 11:35:44 -05:00
Mariusz Felisiak ad5f33ee03
Refs #27954 -- Fixed typo in django/db/backends/postgresql/client.py comment. 2017-11-26 16:27:37 +01:00
Sergey Fedoseev 31425f71bc Used bytes.hex() and bytes.fromhex() in postgis.pgraster to simplify.
This was missed in 93cdd07e8f.
2017-11-24 07:52:13 -05:00
Sergey Fedoseev 93cdd07e8f Used bytes.hex() and bytes.fromhex() to simplify. 2017-11-23 08:52:23 -05:00
Yan Mitrofanov 54e5c4a00e Fixed #28820 -- Eliminated an extra query with QuerySet.update() on proxy models. 2017-11-21 12:11:47 -05:00
Dražen Odobašić d97f026a7a Fixed #28817 -- Made QuerySet.iterator() use server-side cursors after values() and values_list(). 2017-11-21 10:33:56 -05:00
Tim Graham e3c852cbd6
Fixed #28804 -- Fixed "Unknown system variable 'transaction_isolation'" on MariaDB.
Regression in 967450a3bf.
2017-11-20 10:08:34 -05:00
Krzysztof Nazarewski 244cc40155 Fixed #26184 -- Allowed using any lookups in ModelAdmin.search_fields.
Thanks Krzysztof Nazarewski for the initial patch.
2017-11-18 19:33:52 -05:00
Chris Lamb 3af305e8b8 Fixed #28810 -- Replaced '%' style logging formatting with str.format() style. 2017-11-18 19:15:08 -05:00
Tim Graham 931c60c521 Refs #28814 -- Fixed "SyntaxError: Generator expression must be parenthesized" on Python 3.7.
Due to https://bugs.python.org/issue32012.
2017-11-17 15:38:29 -05:00
Chris Lamb 648957b707 Fixed #28798 -- Removed unused django.utils.dates.WEEKDAYS_REV, MONTHS_3_REV. 2017-11-17 15:37:58 -05:00
Claude Paroz 9549674043 Updated main translation catalog
Forward port of cd6d18abc3 from stable/2.0.x.
2017-11-15 16:23:18 +01:00
Simon Charette ee85ef8315 Fixed #28792 -- Fixed index name truncation of namespaced tables.
Refs #27458, #27843.

Thanks Tim and Mariusz for the review.
2017-11-14 21:36:25 -05:00
Sergey Fedoseev 967450a3bf Fixed #28794 -- Fixed tx_isolation deprecation warning on MySQL 5.7.20+. 2017-11-14 15:40:44 -05:00
Дилян Палаузов 23bf4ad87f Fixed #28795 -- Removed 'not in' checks and used dict.setdefault(). 2017-11-14 10:52:52 -05:00
Sergey Fedoseev a2ec1e6b2d Used BaseSimpleSerializer for serializing str and bytes in migrations.
Follow up to c716fe8782.
2017-11-13 14:12:46 -05:00
Mariusz Felisiak 2d3cc94284
Fixed #28781 -- Added QuerySet.values()/values_list() support for union(), difference(), and intersection().
Thanks Tim Graham for the review.
2017-11-12 14:28:11 +01:00
Tim Graham 8f8a4d10d3 Refs #26447 -- Removed outdated ETag comment in CommonMiddleware.
Follow up to 48d57788ee.
2017-11-11 20:45:17 -05:00
shanghui 1907fc9b12 Fixed #28534 -- Made JSONField.has_changed() ignore key order and consider True/1 values as different. 2017-11-11 19:45:23 -05:00
Sergey Fedoseev bdb747a5f2 Simplified Field.get_choices(). 2017-11-11 19:38:29 -05:00
Sergey Fedoseev f152678d36 Removed unneeded iter() call in IfNode.nodelist. 2017-11-11 19:36:21 -05:00
Paulo ee49306176 Fixed #27710 -- Made Model.save() invalidate cached, stale relations after a primary key assignment. 2017-11-09 11:40:34 -05:00
shanghui ebb998976e Fixed #28751 -- Corrected the error message for inactive users in AdminAuthenticationForm.
Thanks SeungWon Kang for the report and Tim Graham for the review.
2017-11-08 09:39:12 -05:00
shanghui 359370a8b8 Fixed #28645 -- Reallowed AuthenticationForm to raise the inactive user error when using ModelBackend.
Regression in e0a3d93730.

Thanks Guilherme Junqueira for the report and Tim Graham for the review.
2017-11-08 09:39:12 -05:00
Andrei Fokau 3ae9c356c5 Refs #28593 -- Updated old class names in comments following URL routing changes. 2017-11-08 08:43:39 -05:00
Claude Paroz 0cf00769ad Fixed #28585 -- Calculated admin's change form multipart context variable from forms and formsets
Thanks Tim Graham for the review.
2017-11-07 19:06:32 -05:00
Bjorn Kristinsson ac6a4eb9f9 Fixed #28719 -- Added a helpful exception if MultipleObjectTemplateResponseMixin doesn't generate any template names. 2017-11-07 18:46:52 -05:00
Jonas Haag a2851f204c Fixed #28720 -- Added HttpRequest.get_full_path_info(). 2017-11-07 15:58:05 -05:00
Imran Iqbal 3e7497a05e Fixed #28758 -- Fixed RangeMax/MinValueValidators crash with unbound ranges. 2017-11-07 15:07:03 -05:00
Claude Paroz 1b7780ea08 Fixed #28544 -- Made unlocalize template filter behave like {% localize off %} tag
Thanks Beda Kosata for the report and Tim Graham for the review.
2017-11-07 20:48:15 +01:00
Chris Lamb 998c9dd599 Fixed #28663 -- Add a check for likely incorrectly migrated django.urls.path() routes. 2017-11-07 11:39:59 -05:00
Sergey Fedoseev a4f9ef4fe8 Refs #28518 -- Improved performance of assigning values to GeometryFields. 2017-11-07 09:49:29 -05:00
Дилян Палаузов c69e4bc691 Fixed #28769 -- Replaced 'x if x else y' with 'x or y'. 2017-11-07 09:08:46 -05:00
Дилян Палаузов 6c0042430e Fixed #28776 -- Fixed a/an/and typos in docs and comments. 2017-11-06 22:41:03 -05:00
Yusuke Miyazaki 278d66b94b Fixed #28501 -- Fixed "python -m django runserver" crash. 2017-11-06 09:58:15 -05:00
Sergey Fedoseev e9a370bb6a Simplified GeometryField.select_format(). 2017-11-04 10:08:25 -04:00
Tom b81905bfd4 Fixed #28571 -- Added a prompt to bypass password validation in createsuperuser. 2017-11-03 20:00:08 -04:00
Nick 3d22121a0b Clarified error message for when sqlplarse isn't installed. 2017-11-03 10:09:46 -04:00
Ondrej Kolimar ba2c4ec7cc Fixed #28768 -- Added Slovak char map for Javascript slug generation. 2017-11-03 09:22:59 -04:00
Mike Hansen 514b2c989a Fixed #28723 -- Fixed RelatedManager's prefetch_related() cache name. 2017-11-02 10:06:00 -04:00
Michał Pasternak e554b72a2a Fixed #28749 -- Added subquery support for ArrayField's __in lookup. 2017-11-01 15:12:18 -04:00
Tim Graham afd375fc34
Fixed #28741 -- Removed unnecessary leading dot from cross-domain cookie examples. 2017-11-01 10:57:59 -04:00
Charlie Denton cbe334918a Fixed #28750 -- Allowed models to define Meta.manager_inheritance_from_future for backwards compatibility.
Refs 631f4ab061.
2017-10-31 13:22:27 -04:00
Adam Johnson acc989f037 Fixed #28760 -- Removed DummyCache's unnecessary get/set/delete_many(). 2017-10-31 12:16:09 -04:00
Ville Skyttä 23e551ce6c Refs #23919 -- Updated references to urllib.quote() to Python 3 location. 2017-10-31 12:05:54 -04:00
Paulo fcfcf8aae4 Fixed #28742 -- Fixed AttributeError crash when assigning None to cached reverse relations. 2017-10-30 14:02:03 -04:00
Adam Johnson abacd09f07 Refs #27318 -- Made DummyCache.set_many() return a list for consistency with other backends. 2017-10-30 12:13:17 -04:00
Ran Benita 03049fb8d9 Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE .. OF.
Thanks Adam Chidlow for polishing the patch.
2017-10-28 20:33:42 -04:00
Tim Baxter 73241132f2 Refs #28457 -- Removed unused .next-step CSS in django/views/templates/default_urlconf.html. 2017-10-28 07:59:59 -04:00
Tim Baxter f6b5cecc71 Refs #28457 -- Updated the colors of the 'Congrats' page for WCAG AA compliance. 2017-10-28 07:57:27 -04:00
Duarte Fernandes 019c2600a6 Fixed #28747 -- Fixed typos in django/conf/global_settings.py comments. 2017-10-26 21:48:31 -04:00
Srinivas Reddy Thatiparthy 55b5393bd2 Fixed #28474 -- Made DurationField raise ValidationError for inputs that raised OverflowError. 2017-10-25 18:05:13 -04:00
Mariusz Felisiak 81e357a7e1 Fixed #28689 -- Fixed unquoted table names in Subquery SQL when using OuterRef.
Regression in f48bc7c3db.
2017-10-25 21:52:38 +02:00
Ryan Verner 9473a8481a Fixed #28740 -- Added 'continent_code' and 'continent_name' in GeoIP2.city() dict. 2017-10-25 10:07:37 -04:00
medmunds d1317edad0 Fixed #28739 -- Fixed get_fixed_timezone() for negative timedeltas. 2017-10-24 21:27:53 -04:00
Scot Hacker 6642a646f0 Fixed #28735 -- Fixed typo in django/views/templates/default_urlconf.html. 2017-10-24 11:17:47 -04:00
Jon Dufresne 6ed347d851 Fixed #28706 -- Moved AuthenticationFormn invalid login ValidationError to a method for reuse. 2017-10-23 09:10:45 -04:00
Tim Graham 7fb913c805 Removed Python 2 comment in ValidationError. 2017-10-23 08:56:41 -04:00
Claude Paroz 68407e3545 Refs #14807 -- Removed unneeded mark_safe call 2017-10-22 12:10:27 +02:00
Tomer Chachamu 21a3a29dc9 Fixed #28722 -- Made QuerySet.reverse() affect nulls_first/nulls_last. 2017-10-21 20:55:45 -04:00
Claude Paroz 9ec7d8e514 Fixed #28730 -- Fixed loss of precision for large integer literals in templates
Thanks Fraser Nevett for the report and Tim Graham for patch edits.
2017-10-21 17:20:29 +02:00
Mads Jensen 45d5d2dcaa Removed unnecessary tuple()/list() calls. 2017-10-21 09:42:25 -04:00
Mariusz Felisiak 0f722d865e Removed redundant inner imports. 2017-10-20 18:30:41 -04:00
Flávio Juvenal f6e1789654 Fixed #28577 -- Added checks for ArrayField and JSONField to prevent mutable defaults. 2017-10-20 13:17:22 -04:00
Lucas Connors 5ceaf14686 Fixed #27515 -- Made AuthenticationForm's username field use the max_length from the model field.
Thanks Ramin Farajpour Cami for the report.
2017-10-20 11:13:26 -04:00
Mads Jensen f7036b3e26 Fixed #28662 -- Silenced join template filter error if arg isn't iterable. 2017-10-20 09:46:31 -04:00
Simon Charette d4fb742094 Refs #28575 -- Made RelatedObjectDoesNotExist classes pickable.
Thanks to Rachel Tobin for the initial __qualname__ work and tests.
2017-10-18 21:43:53 -04:00
Simon Charette 0a69479b6c Fixed outdated comment in RelatedObjectDoesNotExist. 2017-10-18 20:31:47 -04:00
Jonas Haag d997ab7764 Fixed #28711 -- Fixed unordered_list template filter with lazy translations. 2017-10-18 19:45:10 -04:00
Eneko Illarramendi 2346636b0c Updated Basque (eu) locale formats. 2017-10-17 11:34:46 -04:00
Tim Graham 1b73ccc4bf Fixed #28497 -- Restored the ability to use sliced QuerySets with __exact.
Regression in ec50937bcb.

Thanks Simon Charette for review.
2017-10-16 13:56:38 -04:00
Joe Arthur 61a6245dc5 Fixed typo in MessageMiddleware.process_response() docstring. 2017-10-16 10:10:43 -04:00
Yuri Kaszubowski Lopes d98210c255 Fixed #28713 -- Prevented ModelBackend.get_all_permissions() from mutating get_user_permissions(). 2017-10-14 20:47:49 -04:00
k 399a8db33b Fixed #28695 -- Allowed models to use __init_subclass__(). 2017-10-13 21:29:12 -04:00
Simon Charette 9dd405973c Corrected examples in related field descriptor docstrings.
Using lowercased model class names suggested that accessing the attribute
from instances of the class returned an instance of the descriptor, but
this is only the case when accessed from the model class.
2017-10-13 16:06:08 -04:00
Simon Charette 216eda103b Refs #28575 -- Removed unnecessary code for model exception pickling.
Setting __qualname__ is sufficient for pickling of DoesNotExist and
and MultipleObjectsReturned to work correctly.
2017-10-13 15:45:12 -04:00
Tim Graham f2868f9739 Updated email.Util (Python 2) references to email.utils (Python 3). 2017-10-13 15:36:09 -04:00
Mariusz Felisiak 4f27e475b3 Refs #28643 -- Reorganized database functions.
Thanks Tim Graham for the review.
2017-10-13 21:23:00 +02:00
Claude Paroz 8c538871bd Fixed #28710 -- Fixed the Basque DATE_FORMAT string
Thanks Eneko Illarramendi for the report and initial patch.
2017-10-13 19:48:20 +02:00
Tim Graham 941b0a5b33 Fixed #28708 -- Added constants to detect the Python version. 2017-10-13 10:11:15 -04:00
Tom abb636c1af Improved performance of utils.html.escape(). 2017-10-13 09:20:13 -04:00
Rachel Tobin 6c92f711ea Refs #28575 -- Allowed pickling Model.DoesNotExist and MultipleObjectsReturned classes. 2017-10-13 09:16:09 -04:00
Paulo a7b5ad8b19 Fixed #27846 -- Made Model.refresh_from_db() clear cached relations. 2017-10-12 17:04:10 -04:00
Tim Graham df0aebc893 Simplified IfNode.nodelist 2017-10-12 16:46:31 -04:00
Tim Graham cf59392e16 Removed unused ForNode.__iter__().
Unknown if it was ever used.
2017-10-12 16:46:31 -04:00
Tim Graham 0edff2107f Refs #28248 -- Clarified the precision of PASSWORD_RESET_TIMEOUT_DAYS. 2017-10-12 14:58:18 -04:00
Sævar Öfjörð Magnússon f90be0a83e Fixed #28688 -- Made admin's URLify.js skip removal of English words if non-ASCII chars are present. 2017-10-12 11:50:20 -04:00
François Freitag 41be85862d Fixed #28679 -- Fixed urlencode()'s handling of bytes.
Regression in fee42fd99e.

Thanks Claude Paroz, Jon Dufresne, and Tim Graham for the guidance.
2017-10-12 09:08:33 -04:00
Daniel Tao 4d60261b2a Fixed #28601 -- Prevented cache.get_or_set() from caching None if default is a callable that returns None. 2017-10-10 09:20:34 -04:00
Hasan Ramezani 6aec130a4c Fixed #28591 -- Added an error message for createsuperuser --username= (blank). 2017-10-09 21:49:35 -04:00
Mariusz Felisiak 0899d583bd Fixed #28670 -- Added FETCH/OFFSET support on Oracle.
Thanks Tim Graham for the review.
2017-10-09 18:07:03 +02:00
Johannes Hoppe 3a191bd4ab Fixed #28685 -- Fixed awkward wrapping of Select2 chips. 2017-10-09 09:00:24 -04:00
Mariusz Felisiak 11ade8eefd Refs #24254 -- Removed unnecessary SQL AS clause in SQLCompiler.as_sql().
Incorrect on Oracle.
2017-10-06 12:47:41 -04:00
Simon Charette 9d93dff333 Fixed #28665 -- Change some database exceptions to NotImplementedError per PEP 249. 2017-10-06 12:47:08 -04:00
Mariusz Felisiak 1b823b8f18 Fixed #28596 -- Fixed QuerySet.bulk_create() and cascade deletion crash on Oracle when using more than 65535 parameters.
Thanks Tim Graham for the review.
2017-10-05 18:52:37 +02:00
Mads Jensen ee7ab1b6e2 Refs #27546 -- Replaced hardcoded class name in ForNode.__repr__(). 2017-10-05 11:23:35 -04:00
Mariusz Felisiak 03da070f5c Refs #28670 -- Moved LIMIT/OFFSET SQL to DatabaseOperations.limit_offset_sql().
Thanks Tim Graham for the review.
2017-10-04 20:24:38 +02:00
Tim Graham 39eba25f47 Passed ignore_failures as a kwarg for readability in template tags.
Also removed unused VariableDoesNotExist catching where failures are ignored.
2017-10-04 09:26:13 -04:00
Tim Graham d0c761d3f8 Refs #28584 -- Removed unused DatabaseFeatures.can_share_in_memory_db. 2017-10-03 20:17:12 -04:00
Tim Graham a2626cb3fe Fixed #28674 -- Removed unused check in QuerySet._batched_insert(). 2017-10-03 19:56:44 -04:00
Tim Graham 27193aea00 Fixed #28584 -- Dropped support for SQLite < 3.7.15. 2017-10-03 10:42:18 -04:00
Tim Graham 51d230e00b Fixed #28675 -- Removed always True variable in SQLInsertCompiler.execute_sql() check.
Unused since 7deb25b8dd.
2017-10-03 10:32:11 -04:00
Tom f1c007bbf2 Fixed #28642 -- Added caching to parse_accept_lang_header(). 2017-10-02 14:07:28 -04:00
Hunter Richards 47016adbf5 Fixed #28490 -- Removed unused code in admin.E108 check. 2017-10-02 13:04:42 -04:00
Дилян Палаузов 5d9b736fd8 Fixed #28652 -- Fixed a few comments in django/db/models/*. 2017-10-02 11:15:26 -04:00
Mariusz Felisiak d896809a3a Refs #23919 -- Removed unneeded float()/int() calls. 2017-10-02 08:49:26 -04:00
Jon Dufresne f0ffa3f4ea Refs #27025, #28593 -- Fixed "invalid escape sequence" warnings in urls/resolvers.py. 2017-09-30 20:33:07 -04:00
Mads Jensen 6d1df84c00 Corrected typos in BaseDatabaseOperations exception messages. 2017-09-30 19:18:51 -04:00
Mads Jensen 77d1b19623 Removed always True if check in stringfilter decorator. 2017-09-30 18:01:35 -04:00
Tim Graham fd866c25d1 Fixed #28654 -- Dropped support for SpatiaLite 4.0. 2017-09-30 14:13:18 -04:00
Tim Graham dd82f33271 Fixed #27979 -- Made MySQL raise IntegrityError rather than OperationalError when saving negative numbers in PositiveInteger fields. 2017-09-29 15:20:32 -04:00
Mariusz Felisiak 3fa0a824c2 Refs #27067 -- Removed string_concat in django.utils.translation.__all__.
Undefined since 87d2240e6c.
2017-09-29 10:32:32 -04:00
Mads Jensen 8d40eb0e89 Used NotSupportedError for some unsupported database opreations per PEP 249. 2017-09-29 09:49:55 -04:00
Simon Charette f1b713024e Refs #28492 -- Defined aggregates' output_field at the class level.
Missed in 08654a99bb.
2017-09-29 07:44:27 -04:00
Tim Graham 4710753875 Added missing punctuation in django/shortcuts.py docstring. 2017-09-28 14:39:54 -04:00
Mariusz Felisiak 2b5a511bd9 Merged hash() calls.
Thanks Simon Charette for the review.
2017-09-28 12:12:47 -04:00
Mariusz Felisiak fc6528b25a Fixed #28629 -- Made tree.Node instances hashable.
Regression in 508b5debfb which
added Node.__eq__().
2017-09-28 12:07:19 -04:00
Mads Jensen 4508fafe16 Simplified various __eq__() methods. 2017-09-28 09:18:37 -04:00
Tim Graham 1d8cfa3608 Fixed #28626 -- Dropped support for PostgreSQL 9.3.
Thanks Simon Charette for the introspection changes.
2017-09-27 11:00:04 -04:00
Josh Schneier e8c4596329 Fixed #28562 -- Fixed DecimalValidator handling of positive exponent scientific notation. 2017-09-27 09:42:04 -04:00
Ed Morley 2d4ccac275 Fixed #28603 -- Clarified comment in collectstatic's collect(). 2017-09-27 08:45:10 -04:00
Tim Graham 98706bb35e Refs #27857 -- Replaced json.loads() ValueError exception catching with JSONDecodeError. 2017-09-25 17:11:06 -04:00
Tim Graham cfff2af02b Fixed #27857 -- Dropped support for Python 3.4. 2017-09-25 17:11:03 -04:00
Tim Graham a80903b711 Removed DatabaseFeatures.supports_microsecond_precision.
MySQL 5.5 (refs #28552) was the last database to use it.
2017-09-25 14:48:15 -04:00
Tim Graham 8a1768432b Fixed #28552 -- Dropped support for MySQL 5.5. 2017-09-25 14:48:11 -04:00
Mariusz Felisiak 00709d704e Merged startswith() calls. 2017-09-25 09:18:29 -04:00
Tim Graham 67a6ba391b Reverted "Fixed #28248 -- Fixed password reset tokens being valid for 1 day longer than PASSWORD_RESET_TIMEOUT_DAYS."
This reverts commit 95993a89ce.
2017-09-25 09:05:00 -04:00
Claude Paroz c180abe6f1 Fixed JS linter error
Regression introduced in 1f3dfd783d.
2017-09-24 17:51:50 +02:00
Claude Paroz 1f3dfd783d Updated translation catalogs
Forward port of 600104172a from stable/2.0.x.
2017-09-24 13:54:54 +02:00
Claude Paroz fe000ab18d Refs #25006 -- Marked again admin time picker shortcuts for translation 2017-09-24 13:41:51 +02:00
Tim Graham 4a461d49c7 Advanced deprecation warnings for Django 2.1. 2017-09-22 12:51:19 -04:00
Tim Graham 2bd207ada0 Refs #15667 -- Removed support for Widget.render() methods without the renderer argument.
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham ba42456c2e Refs #27648 -- Removed support for (iLmsu) regex groups in url() patterns.
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham 5bcca2a056 Refs #27532 -- Removed Model._meta.has_auto_field per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham 48d57788ee Refs #26447 -- Removed the USE_ETAGS setting per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham 4502489a46 Refs #18974 -- Removed @models.permalink() decorator per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham 5e31be1b96 Refs #25187 -- Required the authenticate() method of authentication backends to have request as the first positional argument.
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham 578711c310 Refs #27098 -- Removed DatabaseIntrospection.get_indexes() per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham e62165b898 Refs #27175 -- Removed exception silencing from the {% include %} template tag.
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham 96107e2844 Refs #26956 -- Removed the host parameter of django.utils.http.is_safe_url().
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham e47b56d791 Refs #20892 -- Removed support for passing pylibmc behavior settings as top-level attributes of CACHES['OPTIONS'].
Per deprecation timeline.
2017-09-22 12:51:17 -04:00
Tim Graham 87d2240e6c Refs #27067 -- Removed django.utils.translation.string_concat() per deprecation timeline. 2017-09-22 12:51:17 -04:00
Tim Graham 9463a7a8cd Refs #26840 -- Removed django.test.runner.setup_databases() per deprecation timeline. 2017-09-22 12:51:17 -04:00
Tim Graham 6e40b70bf4 Refs #26929 -- Removed extra_context parameter of contrib.auth.views.logout_then_login().
Per deprecation timeline.
2017-09-22 12:51:17 -04:00
Tim Graham 4f313e284e Refs #17209 -- Removed login/logout and password reset/change function-based views.
Per deprecation timeline.
2017-09-22 12:51:17 -04:00
Tim Graham 92fad87958 Bumped version; master is now 2.1 pre-alpha. 2017-09-22 12:51:17 -04:00
Nicolas Delaby 01d440fa1e Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) support.
Thanks Anssi Kääriäinen for contributing to the patch.
2017-09-22 11:53:17 -04:00
Mariusz Felisiak 3f9d85d95c Removed unused eof argument to BoundaryIter._find_boundary().
Unused since its introduction in d725cc9734.
2017-09-22 10:47:14 -04:00
Daniel Tao 6f7279c4b1 Refs #28593 -- Made URLResolver._populate() more resilient to signal interrupts.
_populate() sets the populating attribute to prevent infinite recursion in
case a urlconf includes itself. The flag is a threadlocal to avoid a race
condition [1] where one thread sets the flag and another checks it, then
proceeds to access data that's supposed to be populated (e.g. _reverse_dict)
but isn't yet.

The potential still exists for a thread to set the threadlocal, then be
interrupted by a signal such as SIGALRM and raise before resetting the
threadlocal flag. In this scenario, subsequent calls to _populate() in the
same thread will short-circuit erroneously.

The bulk of the method was already wrapped in a try/finally in df41b5a, but
since a signal interrupt can occur at any line executed by the interpreter,
this moves up the try to ensure threadlocal gets reset.

[1]: https://groups.google.com/d/msg/django-developers/D_bIeinKHjE/4NmVQUJqAgAJ
2017-09-22 10:16:05 -04:00
Shai Berger d612026c37 Refs #28595 -- Added a hook to add execute wrappers for database queries.
Thanks Adam Johnson, Carl Meyer, Anssi Kääriäinen, Mariusz Felisiak,
Michael Manfre, and Tim Graham for discussion and review.
2017-09-21 12:13:09 -04:00
Stefan Sinca 347551c2a1 Fixed #28508 -- Set the foreground color to black in CSRF and 404 error templates. 2017-09-21 10:23:23 -04:00
Niall Dalton 4fe6588da3 Fixed #28576 -- Added color interpretation method to GDALBand. 2017-09-21 09:42:38 -04:00
Thomas Schorr 52eb5b289e Fixed #28617 -- Made ogrinspect output pep8 compliant. 2017-09-20 21:03:14 -04:00
Sjoerd Job Postmus df41b5a05d Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.
Thanks Aymeric Augustin for shepherding the DEP and patch review.
Thanks Marten Kenbeek and Tim Graham for contributing to the code.
Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
2017-09-20 18:04:42 -04:00
Florian Apolloner c4c128d67c Fixed #28488 -- Reallowed error handlers to access CSRF tokens.
Regression in eef95ea96f.
2017-09-20 16:22:18 -04:00
Nicolas Delaby a30ef353e2 Removed unused list in Query.resolve_lookup_value().
Unneeded since its introduction in 4f138fe5a4.
2017-09-20 09:50:14 -04:00
Tim Graham f7b0532ec0 Refs #28334 -- Fixed crash in hstore/citext oid caching during test db creation. 2017-09-19 07:04:31 -04:00
Mariusz Felisiak fb02ebe889 Fixed #28597 -- Fixed crash with the name of a model's autogenerated primary key in an Index's fields. 2017-09-18 14:06:00 -04:00
Johannes Hoppe 94cd8efc50 Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ManyToManyField in the admin.
Thanks Florian Apolloner and Tim Graham for review and
contributing to the patch.
2017-09-18 13:48:02 -04:00
Johannes Hoppe 01a294f8f0 Refs #14370 -- Vendored Select2 4.0.3 for use by the admin.
From https://github.com/select2/select2/releases/tag/4.0.3
2017-09-18 13:47:50 -04:00
Mads Jensen d549b88050 Fixed #26608 -- Added support for window expressions (OVER clause).
Thanks Josh Smeaton, Mariusz Felisiak, Sergey Fedoseev, Simon Charettes,
Adam Chainz/Johnson and Tim Graham for comments and reviews and Jamie
Cockburn for initial patch.
2017-09-18 09:42:29 -04:00
Mads Jensen 3939e2b4dc Changed default value of DatabaseFeatures.has_bulk_insert to True. 2017-09-18 08:12:35 -04:00
elky dc37e8846e Fixed #26818 -- Added responsive CSS for the admin. 2017-09-16 19:11:19 -04:00
Sergey Fedoseev 8f947730ca Removed unneeded StdDev.convert_value() and Variance.convert_value().
Seems unneeded since its introduction in
f59fd15c49.
2017-09-16 15:05:31 -04:00
Sergey Fedoseev 873858009c Simplified Count.convert_value() and RegrCount.convert_value(). 2017-09-16 14:31:51 +05:00
Igor Gumenyuk 86a18dc46a Fixed #28334 -- Added caching for hstore/citext OIDs. 2017-09-15 10:00:12 -04:00
Tim Graham cb362a6750 Removed unnecessary check in SQLCompiler.get_related_selections(). 2017-09-15 08:37:46 -04:00
Mariusz Felisiak 0ec0e5029c Removed unnecessary parens in various code. 2017-09-13 21:20:29 -04:00
Tim Graham ee4043f735 Refs #28593 -- Moved django.conf.urls.include() to django.urls().
The old location remains for backwards compatibility. Documentation
will be updated separately along with the rest of the URL routing changes.
2017-09-13 16:32:03 -04:00
Mariusz Felisiak 0214f367bc Merged isinstance() calls. 2017-09-13 15:00:45 -04:00
Mariusz Felisiak c6a1faecc3 Refs #27090 -- Added real database sequence introspection.
Thanks Mariusz Felisiak for the Oracle part and Tim Graham for the
review.
2017-09-13 20:12:32 +02:00
Sergey Fedoseev c2ecef869c Refs #28569 -- Fixed gis_tests.inspectapp.tests.OGRInspectTest.test_time_field. 2017-09-12 22:19:44 +05:00
Tom ac756f16c5 Fixed #28440 -- Fixed WSGIServer hang on responses without a Content-Length.
Disabled keep-alive to fix the regression in
e6065c7b83.
2017-09-12 10:41:28 -04:00
Tim Graham 2a4b331348 Moved contrib.gis.geometry.regex to contrib.gis.geometry. 2017-09-12 09:51:02 -04:00
Tim Graham f896eb30f6 Removed django.contrib.gis.geometry.backend.
The layer of indirection is unchanged and undocumented
since its introduction in ff60c5f9de.
2017-09-12 09:51:02 -04:00
Sergey Fedoseev f36e5d68d9 Used sqlite3.Connection.load_extension() instead of query execution for SpatiaLite loading. 2017-09-12 09:35:33 -04:00
Sergey Fedoseev bd903e8a6e Fixed #28570 -- Dropped support for GEOS 3.3.x.
Removed setting SRID in GEOSGeometry.clone() which was only required
in GEOS 3.3.0.
2017-09-11 13:57:24 -04:00
Simon Charette 08654a99bb Fixed #28492 -- Defined default output_field of expressions at the class level.
This wasn't possible when settings were accessed during Field initialization
time as our test suite setup script was triggering imports of expressions
before settings were configured.
2017-09-11 12:22:39 -04:00
Simon Charette 13be453080 Refs #28492 -- Stopped accessing settings at Field.db_tablespace initialization.
Deferring accesses to settings allows database fields to be initialized before
settings are loaded.
2017-09-11 12:21:49 -04:00
Sergey Fedoseev 3905cfa1a5 Fixed #28353 -- Fixed some GIS functions when queryset is evaluated more than once.
Reverted test for refs #27603 in favor of using FuncTestMixin.
2017-09-11 11:56:39 -04:00
Jon Dufresne 99e65d6488 Fixed #28578 -- Renamed DatabaseCreation number arguments to suffix. 2017-09-11 11:32:40 -04:00
Sergey Fedoseev a0b4ecce57 Fixed #28392 -- Fixed GIS's WKT regex to match large scientific notation numbers.
Thanks Greg Larmore for report and initial patch.
2017-09-11 09:13:02 -04:00
Mariusz Felisiak a4092af3d3
Removed unnecessary parens in _get_app_label_and_model_name(). 2017-09-10 21:26:06 +02:00
Claude Paroz a599ae6018 Refs #24928 -- Added introspection support for PostgreSQL RangeField 2017-09-09 20:22:47 +02:00
Claude Paroz 0cbb6ac007 Refs #24928 -- Added introspection support for PostgreSQL JSONField
Thanks Adam Johnson and Tim Graham for the reviews.
2017-09-09 18:26:29 +02:00
Luoxzhg ffbee67f8e Fixed some comments referring to a nonexistent TestClient class. 2017-09-09 11:21:15 -04:00
Sergey Fedoseev 8b5a29800c Fixed #25961 -- Removed handling of non-thread safe GEOS functions. 2017-09-09 10:14:48 -04:00
Sergey Fedoseev 0ab1dc0a8b Fixed deepcopy of AreaField and DistanceField. 2017-09-08 14:13:50 -04:00
Tim Graham 0c4ac12a7b Fixed #28546 -- Fixed translation's to_locale() with langauge subtags.
Thanks Brent Hand for the initial patch.
2017-09-08 13:46:00 -04:00
Tim Graham 22a5b8891c Removed to_lower parameter for translation's to_locale().
Unused since 2bab9d6d9e.
2017-09-08 13:12:43 -04:00
Sergey Fedoseev ff17ef1ada Simplified GEOSFuncFactory. 2017-09-08 10:38:30 -04:00
Tim Graham 6e4c6281db Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Sergey Fedoseev 8b2515a450 Removed unneeded __init__() methods. 2017-09-07 08:10:49 -04:00
Sergey Fedoseev f3c9562143 Fixed #15648 -- Allowed QuerySet.values_list() to return a namedtuple. 2017-09-06 15:32:32 -04:00
Olivier Tabone a027447f56 Fixed #27318 -- Made cache.set_many() return the list of failed keys. 2017-09-06 14:38:44 -04:00
Sami J. Lehtinen 407c1249c9 Fixed #28032 -- Added Paginator.get_page().
Moved boilerplate from docs to a method.
2017-09-06 14:17:19 -04:00
Sergey Fedoseev 5b1c389603 Refs #23919 -- Replaced usage of django.utils.functional.curry() with functools.partial()/partialmethod(). 2017-09-06 13:11:18 -04:00
Sergey Fedoseev 34f27f910b Replaced @cached_property with class attributes where possible. 2017-09-06 10:13:43 -04:00
Sergey Fedoseev 690fc30d44 Removed DatabaseWrapper.psycopg2_version.
Unused since 3adc5f1ee6.
2017-09-06 09:51:56 -04:00
Sergey Fedoseev 379caf397e Replaced deque() with list() in prefetch_related_objects().
deque() isn't needed since algorithm doesn't require FIFO.
2017-09-06 08:13:18 -04:00
Sergey Fedoseev a8ad1e3216 Replaced get_pointer_arr() with usage of GEOM_PTR for simplicity. 2017-09-06 08:06:36 -04:00
François Freitag ad4a8acdb5 Fixed #11557 -- Added support for a list of fields in Meta.get_latest_by and QuerySet.earliest()/latest(). 2017-09-05 20:14:54 -04:00
Dima Kudosh 093fd479d6 Fixed #28335 -- Allowed query expressions in Meta.ordering. 2017-09-05 19:10:20 -04:00
Mads Jensen 15f2d87ceb Removed unneeded __init__() in PostgreSQL DatabaseWrapper. 2017-09-05 16:22:36 -04:00
Boris Burkov d67cce4da8 Fixed typo in django/db/models/query.py docstring. 2017-09-05 15:28:37 -04:00
Josh Schneier 48c394a6fc Fixed #28555 -- Made CharField convert whitespace-only values to the empty_value when strip is enabled. 2017-09-05 12:41:38 -04:00
Tim Graham 46e2b9e059 Fixed CVE-2017-12794 -- Fixed XSS possibility in traceback section of technical 500 debug page.
This is a security fix.
2017-09-05 10:58:38 -04:00
Sergey Fedoseev 2ef4b4795e Refs #28518 -- Improved performance of loading geometries from DB. 2017-09-05 09:54:57 -04:00
Sergey Fedoseev c309ec0824 Simplified admin.widgets.url_params_from_lookup_dict(). 2017-09-05 09:47:11 -04:00
Sergey Fedoseev 3633c2a045 Used dict comprehensions in BaseMemcachedCache.get_many() and set_many() for better readability. 2017-09-05 09:14:41 -04:00
Mariusz Felisiak 179b247e07 Removed useless condition from Oracle's NullBooleanField's check constraint.
NULL cannot be compare with standard operators on Oracle, it works only
with IS NULL and IS NOT NULL operators. Therefore 'OR ... IS NULL'
condition in NullBooleanField's check constraint is redundant.
Nullability is checked in a separate constraint.
2017-09-05 11:17:06 +02:00
Mads Jensen f4135783ad Fixed #28126 -- Added GistIndex to contrib.postgres.
Thanks to Marc Tamlyn for the initial patch.
2017-09-04 21:08:02 -04:00
Nick Pope 66657eb01f Improved messages in IndexErrors raised by GDAL objects. 2017-09-04 19:00:32 -04:00
Nick Pope 0d9e1163e8 Fixed #28569 -- Corrected get_layer_by_name prototype to skip error checking.
All other get_*_by_name functions have errcheck=False. This makes it
return None for an invalid name instead of raising a GDALException.
2017-09-04 18:56:23 -04:00
Jeremy Satterfield 0891503fad Fixed #28493 -- Made migrations autodetector find dependencies for model renaming. 2017-09-04 15:15:39 -04:00
Sebastian Sassi 5848305218 Fixed #28082 -- Made BaseDateListView pass context from get_dated_items() to subclasses.
Thanks leon-matthews for the report and fix.
2017-09-04 10:55:18 -04:00
Srinivas Reddy Thatiparthy 0d3f567a7a Corrected YearComparisonLookup.get_bound() signature. 2017-09-04 10:17:51 -04:00
Igor Tokarev af35c69a3c Fixed #26344 -- Made EmailMessage include alternatives when the body is empty and it has attachments. 2017-09-04 08:46:11 -04:00
Nick Pope 9397d3add4 Fixed #28558 -- Simplified code to remove OGRIndexError.
The test is a regression for refs #4740 to show that the original fix of
OGRIndexError is no longer needed.

This is similar to the removal of GEOSIndexError in
197b187810.
2017-09-03 21:19:37 -04:00
caleb logan 68f0e8d8b1 Fixed #28500 -- Fixed crash in FileBasedCache._is_expired() if the cache file is empty. 2017-09-03 20:11:49 -04:00
ZachLiuGIS 2dacc2ccd9 Fixed #28550 -- Restored contrib.auth's login() and logout() views' respect of positional arguments.
Regression in 78963495d0.

Forwardport of f8e0557b01 from stable/1.11.x
2017-09-03 12:06:44 -04:00
Mariusz Felisiak fe0184b412 Updated EmpytResultSet import not to use the alias. 2017-09-03 11:06:06 -04:00
Mariusz Felisiak 2470756de0 Moved select_sql in SQLCompiler.get_extra_select() to improve performance. 2017-09-02 16:39:51 -04:00
Nick Pope adc07e8f90 Simplified index bounds checking in GDAL objects. 2017-09-02 09:04:01 -04:00
Nick Pope f9c2fd30be Fixed #28559 -- Removed contrib.gis.gdal.OGRException backwards compatibility alias. 2017-09-02 08:52:01 -04:00
Jeremy Kerr 84b7cb7df0 Fixed #28549 -- Fixed QuerySet.defer() with super and subclass fields.
Previously, deferring fields in different classes didn't omit the
superclass' deferred field.

Thanks Simon Charette for the suggested fix.
2017-08-31 09:35:05 -04:00
Tim Graham e5bd585c6e Fixed #28543 -- Prevented ManyToManyField.value_from_object() from being lazy.
Previously, it was a QuerySet which could reevaluate to a new value if the
model's data changes. This is inconsistent with other Field.value_from_object()
methods.

This allows reverting the fix in the admin for refs #27998.
2017-08-31 09:34:44 -04:00
Nick Pope ec6481246a Fixed #28524 -- Fixed program name in management commands when using 'python -m django'. 2017-08-31 09:22:25 -04:00
Sergey Fedoseev f0d9ede9e6 Removed useless itertools.chain() call in ChoiceWidget.optgroups(). 2017-08-31 08:04:36 -04:00
Sergey Fedoseev ab3e3658cc Simplified model's Options._get_fields() a bit. 2017-08-31 07:11:30 -04:00
caleb logan 9e2bf65d6a Fixed #28530 -- Prevented SelectDateWidget from localizing years in output. 2017-08-29 14:56:08 -04:00
Sergey Fedoseev 44ce308281 Simplified contrib.gis.geos.prototypes by replacing c_char with c_byte. 2017-08-29 14:50:24 -04:00
Claude Paroz afc06b5625 Fixed #28536 -- Removed old JS cross-browser utilities 2017-08-28 20:31:09 +02:00
Collin Anderson 751f7a6d9b Added Media.__repr__().
It makes it easier to debug MediaOrderConflictWarnings
(refs #28377).
2017-08-26 20:57:45 -04:00
Claude Paroz 8275662a24 Removed lone usage of jQuery in admin's calendar.js 2017-08-26 18:00:44 +02:00
Mads Jensen e016c4c65b Refs #27869 -- Omitted field kwargs from GinIndex.deconstruct() if they're None. 2017-08-26 10:32:03 -04:00
Mads Jensen fb42d02471 Refs #25809 -- Omitted pages_per_range from BrinIndex.deconstruct() if it's None. 2017-08-26 09:45:45 -04:00
Sergey Fedoseev 61da949ff6 Simplified migrations.state.ProjectState.__eq__(). 2017-08-25 13:50:01 +05:00
Sergey Fedoseev 1a85b07bdd Fixed #28518 -- Improved performance of loading geometries from DB. 2017-08-24 14:08:35 -04:00
Sergey Fedoseev 481ba33cd2 Used sets for CheckRegistry.registered_checks and deployment_checks. 2017-08-24 10:37:50 -04:00
hui shang c0f4c60edd Fixed #28513 -- Added POST request support to LogoutView. 2017-08-24 09:11:16 -04:00
Fabian Schindler da0fb5b1ec Fixed #28380 -- Excluded null geometries in SpatiaLite geometry lookups. 2017-08-24 08:30:11 -04:00
Sergey Fedoseev a8bb493556 Simplified migrations.graph.Node.iterative_dfs(), ancestors(), and descendants(). 2017-08-23 18:10:00 -04:00
Claude Paroz 09b3e46635 Fixed #27796 -- Prevented middleware being loaded twice with runserver
Thanks Tim Graham for the review.
2017-08-23 23:05:18 +02:00
Sergey Fedoseev f2b93b509c Removed unneeded iter() calls.
A few of these were unnecessarily added in 2b281cc35e.
2017-08-23 16:48:29 -04:00
Sergey Fedoseev dca67bb2c2 Refs #28459 -- Improved performance of SQLCompiler.apply_converters(). 2017-08-23 16:26:24 -04:00
Sergey Fedoseev 4302167939 Used frozenset instead of dict for GeoIP2.cache_options for simplicity. 2017-08-23 11:47:47 -04:00
Sergey Fedoseev fac74b84a3 Used OrderedDict.fromkeys() to initialize OrderedDict with None values. 2017-08-23 11:40:17 -04:00
Sergey Fedoseev 9ad6071aab Simplified usage of sets in MigrationAutodetector. 2017-08-22 16:23:02 -04:00
Kevin Grinberg c6a3546093 Fixed #28451 -- Restored pre-Django 1.11 Oracle sequence/trigger naming.
Regression in 69b7d4b116.
2017-08-22 15:51:08 -04:00
Sergey Fedoseev 4dfd6b88d5 Refs #28459 -- Improved performance of FlatValuesListIterable. 2017-08-22 11:26:07 -04:00
Nick Pope 796fde5b79 Fixed incorrect indentation in remove_stale_contenttypes.
It's unnecessary for content_type_display to be constructed from
ct_info in every loop iteration.
2017-08-22 09:10:42 -04:00
Claude Paroz ed77bea582 Refs #28502 -- Complemented stringformat tuple handling/test.
An additional test and a code change were suggested in a late review.
2017-08-22 08:45:08 -04:00
Simon Meers 7bba82453c Fixed #28496 -- Added ModelAdmin.get_changelist_instance(). 2017-08-22 08:17:26 -04:00
Paulo fea9cb46aa Fixed #28375 -- Fixed KeyError crash on reverse prefetch of a model with OneToOneField primary key to a non-pk field. 2017-08-21 16:14:13 -04:00
Sergey Fedoseev 30eb92fc11 Removed need for hasattr(check, 'tags') in CheckRegistry.
It was needed to pass tests because registered checks weren't properly mocked.
2017-08-21 15:34:20 -04:00
Mariusz Felisiak c47747d45a Removed postgresql_psycopg2.version
Uneeded since 29ea9714ee.
2017-08-21 09:13:07 +02:00
Srinivas Reddy Thatiparthy 4ead705cb3 Fixed #28502 -- Made stringformat template filter accept tuples 2017-08-21 09:04:43 +02:00
Allen, Timothy 9229e005aa Django -> django when styled as a logo with font. This was pointed out at DjangoCon US. 2017-08-21 08:00:54 +02:00
Mariusz Felisiak 6784383e93 Fixed #28498 -- Fixed test database creation with cx_Oracle 6. 2017-08-16 18:39:58 +02:00
Claude Paroz 546412e673 Fixed #28495 -- Converted GDAL Feature.fields to strings 2017-08-15 19:31:22 +02:00
Sergey Fedoseev 41640760df Simplified generation of result in Query.get_aggregation(). 2017-08-15 09:59:31 -04:00
Sergey Fedoseev 8a99a7d2d5 Simplified RelatedPopulator.populate(). 2017-08-15 09:48:07 -04:00
Sergey Fedoseev 6542999c54 Removed redundant condition in QuerySet.resolve_expression(). 2017-08-15 09:44:27 -04:00
Sergey Fedoseev 6141040813 Avoided creation of temporary set in Query.append_annotation_mask(). 2017-08-15 09:43:47 -04:00
Martin von Gagern 71d39571f4 Fixed #28485 -- Made ExceptionReporter.get_traceback_frames() include frames without source code. 2017-08-12 20:32:39 -04:00
Alejandro Zamora 90d7b912b9 Fixed #28201 -- Added ProhibitNullCharactersValidator and used it on CharField form field. 2017-08-12 20:14:14 -04:00
Tom b78d100fa6 Fixed #27849 -- Added filtering support to aggregates. 2017-08-12 17:58:28 -04:00
Mariusz Felisiak 489421b015 Fixed #23546 -- Added kwargs support for CursorWrapper.callproc() on Oracle.
Thanks Shai Berger, Tim Graham and Aymeric Augustin for reviews and
Renbi Yu for the initial patch.
2017-08-12 21:06:49 +02:00
Sergey Fedoseev 47ccefeada Refs #28459 -- Improved performance of BaseExpression.convert_value(). 2017-08-11 18:34:50 -04:00
Sergey Fedoseev 5cc7462067 Refs #28459 -- Optimized ModelState instantiation. 2017-08-11 15:41:04 -04:00
Nerl~ 97cb3bd16d Fixed #28456 -- Allowed customizing Model pickling by overriding __getstate__(). 2017-08-11 15:27:25 -04:00
Sergey Fedoseev 0ec134e340 Simplified calculation of used joins in Query.build_filter(). 2017-08-11 10:46:11 -04:00
Sergey Fedoseev 9ecf280394 Removed obsolete DecimalComparisonLookup.
Unneeded since c3c6c92d76.
2017-08-11 09:32:32 -04:00
Sergey Fedoseev f3e350d631 Replaced typecast_decimal() with decimal.Decimal(). 2017-08-11 09:22:40 -04:00
Sergey Fedoseev 7fa92daa99 Removed outdated comment in Query.build_filter(). 2017-08-11 09:19:19 -04:00
Evan Grim 7937cc16f5 Fixed #28386 -- Made operations within non-atomic migrations honor the operation's atomic flag when migrating backwards. 2017-08-10 19:21:14 -04:00
Sergey Fedoseev c3c6c92d76 Refs #18247 -- Fixed filtering on CombinedExpression(output_field=DecimalField()) annotation on SQLite. 2017-08-10 17:42:30 -04:00
Sergey Fedoseev a146b65628 Refs #28459 -- Improved performance of loading DecimalField on SQLite. 2017-08-10 15:32:28 -04:00
Paulo bfb746f983 Refs #16043 -- Refactored internal fields value cache.
* Removed all hardcoded logic for _{fieldname}_cache.
* Added an internal API for interacting with the field values cache.

Thanks carljm and MarkusH for support.
2017-08-10 12:06:02 -04:00
Sergey Fedoseev 22ff86ec52 Refs #28459 -- Made Oracle get_db_converters() return converter for empty strings only when it's needed. 2017-08-10 10:33:05 -04:00
Srinivas Reddy Thatiparthy 5cb7619995 Simplified Float/DecimalField.validate() with math.isfinite(). 2017-08-09 20:41:39 -04:00
Sergey Fedoseev 5244d7cf54 Simplified SQLite converter for bool type. 2017-08-09 18:10:34 -04:00
Raúl Pedro Fernandes Santos 7104e051c1 Fixed argument name in call_command() docstring.
Follow up to 8f6a1a1551.
2017-08-09 18:05:05 -04:00
Sergey Fedoseev bb91c0a4dc Refs #4518 -- Removed handling of empty strings in typecast_decimal().
It's unclear if the original change was needed, but it seems unneeded now.
Reverted 6fc10f50b0.
2017-08-09 18:02:16 -04:00
Mariusz Felisiak 3189a93ceb Refs #23766 -- Added tests for CursorWrapper.callproc().
Thanks Tim Graham for the review.
2017-08-08 22:13:02 +02:00
Sergey Fedoseev b8731c3fff Refs #28459 -- Improved performance of sql.compiler.cursor_iter(). 2017-08-08 14:07:03 -04:00
Claude Paroz 831358f23d Fixed #28465 -- Unified index SQL creation in DatabaseSchemaEditor
Thanks Tim Graham for the review.
2017-08-08 17:37:43 +02:00
bc500 09423db71a Fixed #28472 -- Optimized a jQuery selector in admin's actions.js. 2017-08-08 08:35:57 -04:00
Sergey Fedoseev fb0bdff981 Refs #28459 -- Improved performance of ValuesIterable. 2017-08-08 11:02:59 +05:00
Srinivas Reddy Thatiparthy b5d47b18f1 Removed unnecessary else in SelectDateWidget.id_for_lable(). 2017-08-07 22:01:45 -04:00
Sergey Fedoseev ba1d82df63 Refs #28459 -- Improved performance of select_related() when model is prefetched from its parent. 2017-08-07 18:55:13 -04:00
Sergey Fedoseev ca46f4688c Refs #28459 -- Improved performance of SQLCompiler.results_iter(). 2017-08-07 17:06:15 -04:00
Timothy Allen 5fe9b7b40a Fixed #28457 -- Updated the design of the 'Congrats' page for new Django projects.
Developed by Timothy Allen and Chad Whitman of The Wharton School with
shepherding from Aymeric Augustin and Collin Anderson.
2017-08-07 10:33:55 -04:00
Srinivas Reddy Thatiparthy 0a24714b26 Removed unnecessary else clause in TemplateStrings.get_template(). 2017-08-07 10:24:58 -04:00
Srinivas Reddy Thatiparthy 6a793d1788 Removed unnecessary assignment in Oracle's FormatStylePlaceholderCursor._fix_for_params().
Obsolete since fae56427e1.
2017-08-07 10:11:54 -04:00
Mariusz Felisiak 7724879b52 Removed unused _combine() node argument from various combinable classes.
Unused since f59fd15c49 (Combinable) and
since its introduction in 2d877da855
(SearchVectorCombinable/SearchQueryCombinable/SearchQuery).
2017-08-02 21:21:32 -04:00
Tim Graham 293608a2e0 Refs #7697 -- Removed unnecessary force_escape of technical 500 debug view "unicode hint".
The test passes before and after the removal. unicode_hint will never
be SafeText, so normal autoescaping is sufficient.
2017-08-02 15:16:22 -04:00
Tim Graham 78c155cf2e Fixed #28441 -- Fixed GEOS version parsing with a commit hash at the end. 2017-08-02 09:30:30 -04:00
Sergey Fedoseev 78f7f68021 Refs #28459 -- Improved performance of Model.from_db() when fields are deferred. 2017-08-02 09:16:36 -04:00
Sergey Fedoseev 7bd9639406 Simplified check that pk is fetched in RawQuerySet.__iter__(). 2017-08-02 08:56:16 -04:00
Mariusz Felisiak 5d9034bc92 Removed unused DatabaseOperations.last_insert_id() on PostgreSQL.
Unused since 9eb2afddfa.
2017-08-01 16:53:17 -04:00
Sergey Fedoseev 2d136ede8a Fixed #28459 -- Improved performance of ValuesListIterable. 2017-08-01 14:44:02 -04:00
Matthew Wilkes 32d1bf2bdb Fixed #28454 -- Simplifed use of Query.setup_joins() by returning a named tuple. 2017-08-01 14:25:54 -04:00
Tim Graham 8df7681d0e Removed unneeded escape filter in templates where autoescaping is enabled. 2017-08-01 10:52:29 -04:00
Sergey Fedoseev 62dee1483d Refs #28370 -- Moved db converters deprecation warning to improve performance. 2017-08-01 08:05:32 -04:00
Sergey Fedoseev 58da81a5a3 Fixed #27985 -- Fixed query for __exact=value when get_prep_value() converts value to None.
Also fixed crash of .filter(field__transform=None).
2017-07-31 15:34:07 -04:00
Anssi Kääriäinen 6155bc4a51 Refs #20880 -- Removed non-cloning logic from Query.clone(). 2017-07-31 15:31:29 -04:00
Anssi Kääriäinen 66933a6619 Refs #20880 -- Removed non-cloning logic from QuerySet._clone(). 2017-07-31 13:57:45 -04:00
Sergey Fedoseev 0baea920c8 Fixed #28453 -- Made __exact=None lookup use transforms. 2017-07-31 13:31:04 -04:00
Sergey Fedoseev aadd3aeb2b Avoided creating temporary lists for obtaining the first item. 2017-07-31 11:02:23 -04:00
Sergey Fedoseev 0f905e4b44 Removed unneeded TruncBase.arity.
Uneeded since its introduction in 2a4af0ea43.
2017-07-31 13:42:12 +05:00
Sergey Fedoseev 38988f289f Avoided creation of temporary sets. 2017-07-29 10:16:43 -04:00
Srinivas Reddy Thatiparthy b306c0c1a3 Fixed #28264 -- Made FilePathField sort files and directories when recursive=True. 2017-07-29 09:15:46 -04:00
Sergey Fedoseev 99e7bba443 Prevented query_utils.refs_expression() from looking for empty string in annotations map. 2017-07-28 08:42:52 -04:00
Mariusz Felisiak b61d5b1991 Fixed #28371 -- Fixed Cast() with CharField if the max_length argument isn't provided.
Thanks Tim Graham for the review.
2017-07-27 19:36:47 +02:00
Sergey Fedoseev 6ebe3a95ea Fixed #28437 -- Added support for complex geometry expressions in GIS lookups. 2017-07-27 08:06:08 -04:00
Mariusz Felisiak 8e41373c81 Allowed database backends to specify data types for Cast().
A small refactor ahead of refs #28371.
2017-07-26 20:26:58 -04:00
Tim Graham ef9344b3a5 Removed unused SpatialOperations.from_wkb.
Unused since its introduction in ff60c5f9de.
2017-07-26 20:03:41 -04:00
Melvyn Sopacua 5bb9b9a388 Fixed #28363 -- Allowed naming the migration generated by squashmigrations. 2017-07-26 13:47:35 -04:00
Sergey Fedoseev 5ccbcc5bf6 Fixed #28433 -- Made GEOSGeometry.__eq__() work correctly with non-canonical EWKT string. 2017-07-26 09:42:02 -04:00
Sergey Fedoseev f3bada9889 Fixed #28436 -- Added support for distance lookups on MySQL. 2017-07-26 08:50:56 -04:00
Sergey Fedoseev 38af496b98 Fixed #28432 -- Allowed geometry expressions to be used with distance lookups.
Distance lookups use the Distance function for decreased code redundancy.
2017-07-25 15:49:35 -04:00