Commit Graph

26361 Commits

Author SHA1 Message Date
Hasan Ramezani 4f8f1b2f24 Fixed #29903 -- Added error message for invalid WeekArchiveView week_format. 2018-10-29 14:22:42 -04:00
Tim Graham 7f2b27e95c Fixed code highlighting in docs/ref/contrib/staticfiles.txt. 2018-10-29 11:55:32 -04:00
Simon Charette d8e03fdeb9 Fixed #29897 -- Fixed autodetector's swappable MTI dependency resolution.
Thanks Steven Ganz for the detailed report.
2018-10-29 11:24:30 -04:00
Simon Charette 82353ef940 Refs #29897 -- Moved autodetector swappable dependency resolution to a method. 2018-10-29 11:17:21 -04:00
Simon Charette f1855fd885 Refs #23322 -- Removed unnecessary "and" clause in the autodetector.
If the depedency was swappable then it'll be resolved at this point.
2018-10-29 11:07:07 -04:00
Simon Charette 95bda03f2d Fixed #29868 -- Retained database constraints on SQLite table rebuilds.
Refs #11964.

Thanks Scott Stevens for testing this upcoming feature and the report.
2018-10-29 10:33:41 +01:00
Tim Graham f77fc56c96
Fixed #29896 -- Fixed incorrect Model.save() cache relation clearing for foreign keys that use to_field.
Regression in ee49306176.
2018-10-28 22:54:02 -04:00
Hampus Dunström 5e8a07d69d Fixed #29763 -- Added support for column renaming on SQLite. 2018-10-27 20:26:39 -04:00
Hasan Ramezani 4c13b90702 Added test coverage for views.generic.dates.MonthMixin.get_month() KeyError branch. 2018-10-27 18:37:44 -04:00
Tim Graham f892781b95 Fixed #28606 -- Deprecated CachedStaticFilesStorage. 2018-10-27 11:58:29 -04:00
Hasan Ramezani 55b0b766fb Completed test coverage of views.defaults.bad_request(). 2018-10-25 20:03:58 -04:00
Tim Graham 717ee63e56
Refs #27025 -- Removed obsolete sqlite3 transaction management workaround for Python 3.6+.
Obsolete per https://bugs.python.org/issue10740#msg274816.
2018-10-25 19:54:48 -04:00
Mariusz Felisiak c6525bea9e Fixed #29534 -- Made dbshell use rlwrap on Oracle if available. 2018-10-25 19:39:42 -04:00
Sergey Fedoseev 9a88c6dd6a Fixed #29827 -- Fixed reuse of test databases with --keepdb on MySQL.
Regression in e1253bc26f.
2018-10-25 19:37:41 -04:00
Mayank Singhal 76b3367035 Fixed #29879 -- Added CSRF_COOKIE_HTTPONLY to CSRF AJAX docs. 2018-10-25 11:39:52 -04:00
Tim Graham f1d1634493 Removed useless check in sqlite's DatabaseWrapper._savepoint_allowed().
Obsolete since 27193aea00.
2018-10-25 10:17:37 -04:00
Tim Graham 9b52bd6575 Made DatabaseFeatures.uses_savepoints default to True. 2018-10-25 10:02:47 -04:00
Sanyam Khurana 83c7096f2a Fixed #29869 -- Made UUIDField.to_python() convert integers. 2018-10-24 20:26:57 -04:00
Hemanth V. Alluri fd49701ab9 Removed a useless sentence in docs/ref/unicode.txt. 2018-10-24 20:01:19 -04:00
Sanyam Khurana c86a3d80a2 Fixed #29721 -- Ensured migrations are applied and recorded atomically. 2018-10-24 19:29:11 -04:00
Simon Charette 32da3cfdf9 Refs #11964 -- Removed raw SQL from and cleaned up constraint operation tests. 2018-10-24 19:18:41 -04:00
Mariusz Felisiak 58d1e9aa8a Ignored flake8 W504 warnings.
W504 is mutually exclusive with W503 that we follow.
2018-10-24 09:17:59 -04:00
Mariusz Felisiak 641742528a Fixed F841 flake8 warning. 2018-10-24 09:13:10 -04:00
Tom Forbes 8f90593e6f Removed obsolete and flaky GeoIP tests. 2018-10-23 20:46:49 -04:00
Hasan Ramezani 6a8b57df6a Completed test coverage of views.static.directory_name(). 2018-10-23 20:44:27 -04:00
Prabakaran Kumaresshan 10d82c85aa Fixed #29831 -- Added validation for makemigrations --name. 2018-10-23 10:05:24 -04:00
Jon Dufresne 136a900ef9 Refs #29877 -- Made diveinto.org URLs HTTPS. 2018-10-23 15:03:00 +02:00
za b0d716cbff Fixed #29877 -- Replaced diveintopython3.net with diveinto.org/python3/. 2018-10-23 11:55:18 +02:00
jannschu efc0f77f02 Fixed #29830 -- Fixed loss of custom utf-8 body encoding in mails. 2018-10-22 15:21:33 -04:00
Tim Graham 043407ec7e Fixed #29880 -- Fixed typo in docs/topics/auth/default.txt. 2018-10-22 15:16:11 -04:00
buzzi 24cae0bedc Fixed #29860 -- Allowed BaseValidator to accept a callable limit_value. 2018-10-22 10:26:54 -04:00
Simon Charette 5e3463f6bc Fixed #27595 -- Made ForeignKey.get_col() follow target chains.
Previously, foreign relationships were followed only one level deep which
prevents foreign keys to foreign keys from being resolved appropriately.
This was causing issues such as improper database value conversion for
UUIDField on SQLite because the resolved expression's output field's
internal type wasn't correct. Added tests to make sure unlikely foreign
reference cycles don't cause recursion errors.

Refs #24343.

Thanks oyooyo for the report and Wayne Merry for the investigation.
2018-10-22 09:49:34 -04:00
Florian Apolloner 4269648c0f Fixed #29876 -- MySQL does not support SPATIAL fields in unique indices. 2018-10-22 13:36:48 +02:00
Florian Apolloner c53af56613 Fixed #29847 -- Ensured proper ordering in queries.
Even though good databases tend to keep the result sorted by the/one
window expression and the planners are smart enough to not resort if not
required, it is not valid to rely on this.

MariaDB specifically did return whatever order it wanted, which is
completely okay. Now we sort towards the expected data for all databases.
2018-10-21 22:05:06 +02:00
Florian Apolloner e127ef62de Fixed a failing test when the source directory is on a readonly fs. 2018-10-21 19:37:58 +02:00
Atul Varma 3deea61f26 Removed "encoding" description in GIS tutorial.
An omission in 388165ade4.
2018-10-21 12:14:06 -04:00
Mariusz Felisiak 328f5627dd
Fixed #29870 -- Added DurationField introspection for Oracle and PostgreSQL.
Thanks Tim Graham for the review.
2018-10-21 09:08:05 +02:00
deby 19126339f3 Fixed Italian's MONTH_DAY_FORMAT.
The `/` is inconsistent with the other languages.
2018-10-20 05:09:41 -04:00
Adam Allred 4e78e389b1 Fixed #29774 -- Fixed django-admin shell hang on startup.
sys.stdin.read() blocks waiting for EOF in shell.py which will
likely never come if the user provides input on stdin via the
keyboard before the shell starts. Added check for a tty to
skip reading stdin if it's not present.

This still allows piping of code into the shell (which should
have no TTY and should have an EOF) but also doesn't cause it
to hang if multi-line input is provided.
2018-10-19 20:00:12 -04:00
Tim Graham a29fce8984 Fixed #29858 -- Clarified docs regarding CSRF token header name. 2018-10-18 19:44:15 -04:00
Andy Chosak 084573c715 Updated Jinja2 static tag example to use django.templatetags.
As of cf546e11ac, this is the
canonical way to invoke the static tag.
2018-10-18 19:19:56 -04:00
aspalding dc5e75d419 Fixed #29838 -- Fixed crash when combining Q objects with __in lookups and lists.
Regression in fc6528b25a.
2018-10-17 11:34:49 -04:00
aspalding 217f82d713 Refs #29838 -- Fixed make_hashable() for values that have lists or dicts nested in tuples.
And for non-hashable values that are iterable, e.g. sets.
2018-10-17 11:17:50 -04:00
aspalding 834c4ec8e4 Moved make_hashable() to django.utils and added tests. 2018-10-17 11:17:23 -04:00
Tom Dyson 6752c2756e Removed obsolete "ugly URL" reference. 2018-10-17 10:20:18 -04:00
Tim Graham 4268d275b8 Fixed #29857 -- Added get_storage_class to django.core.files.storage.__all__. 2018-10-17 09:03:51 -04:00
Florian Apolloner bc7dd8490b Fixed #21171 -- Avoided starting a transaction when a single (or atomic queries) are executed.
Checked the following locations:

 * Model.save(): If there are parents involved, take the safe way and use
   transactions since this should be an all or nothing operation.

   If the model has no parents:

    * Signals are executed before and after the previous existing
      transaction -- they were never been part of the transaction.

    * if `force_insert` is set then only one query is executed -> atomic
      by definition and no transaction needed.

    * same applies to `force_update`.

    * If a primary key is set and no `force_*` is set Django will try an
      UPDATE and if that returns zero rows it tries an INSERT. The first
      case is completly save (single query). In the second case a
      transaction should not produce different results since the update
      query is basically a no-op then (might miss something though).

 * QuerySet.update(): no signals issued, single query -> no transaction
   needed.

 * Model/Collector.delete(): This one is fun due to the fact that is
   does many things at once.

   Most importantly though: It does send signals as part of the
   transaction, so for maximum backwards compatibility we need to be
   conservative.

   To ensure maximum compatibility the transaction here is removed only
   if the following holds true:

     * A single instance is being deleted.
     * There are no signal handlers attached to that instance.
     * There are no deletions/updates to cascade.
     * There are no parents which also need deletion.
2018-10-17 12:19:02 +02:00
Çağıl 38f3de86bd Added a paragraph in docs/intro/contributing.txt. 2018-10-16 16:10:44 -04:00
Mads Jensen 1c0bf95ff6 Refs #23919 -- Removed a stray object-inheritance.
Follow up to 081e787160.
2018-10-16 09:58:53 -04:00
Jon Dufresne 0cd465b63a Fixed #29817 -- Deprecated settings.FILE_CHARSET. 2018-10-15 17:15:41 -04:00