Commit Graph

26472 Commits

Author SHA1 Message Date
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
Jon Dufresne 99d4fc18bd Refs #27829 -- Added warning for settings.DEFAULT_CONTENT_TYPE usage outside of Django. 2018-10-15 16:31:39 -04:00
oliver 1299421cad Fixed #29725 -- Removed unnecessary join in QuerySet.count() and exists() on a many-to-many relation. 2018-10-15 11:01:57 -04:00
Mariusz Felisiak f2e2a1bd4b
Fixed #29845 -- Fixed Cast crash on MySQL when casting to DecimalField. 2018-10-15 15:57:22 +02:00
Taoufik f07091a30f Fixed typo in django/utils/datastructures.py. 2018-10-14 11:20:22 -04:00
Peter Inglesby a1ffbfb801 Removed unused fields from aggregation docs. 2018-10-13 21:13:45 -04:00
Mariusz Felisiak a3052c35d1
Fixed various comments in django/db/backends/oracle/base.py. 2018-10-13 20:25:23 +02:00
Tim Graham 1e3cd51163
Simplified django.utils.html.urlize(). 2018-10-12 12:15:26 -04:00
Tim Graham 910548634a Refs #29826 -- Removed unused characters from urlize configuration.
The HTML characters are unused because urlize is meant to be applied to
plain text and these characters aren't properly detected (refs #29826).
Angle brackets and quotes are present in word_split_re and therefore
won't be used in WRAPPING_PUNCTUATION.
2018-10-12 08:13:52 +02:00
Tim Graham 70a80ff1be Added a urlize test for wrapping characters. 2018-10-12 08:13:52 +02:00
Mac Chapman fb5dfd53a7 Fixed #29832 -- Updated Roboto font to v2.137. 2018-10-11 23:30:45 -04:00
Adam Johnson cecd656184 Simplified deployment checklist docs on customizing error views. 2018-10-11 09:50:08 -04:00
Patrik Sletmo adfdb9f169 Fixed #29814 -- Added support for NoneType serialization in migrations. 2018-10-11 09:02:14 -04:00
Mariusz Felisiak 52fec5d18f
Fixed #29836 -- Bumped required cx_Oracle to 6.0. 2018-10-11 11:43:16 +02:00
Andrea Rabbaglietti 1b49b792e9 Emphasized that ForeignKey.on_delete doesn't create a SQL constraint. 2018-10-10 14:56:50 -04:00
Jon Dufresne c82893cb8c Refs #27795 -- Removed force_bytes() usage from django/utils/http.py.
django.utils.http.urlsafe_base64_encode() now returns a string, not a
bytestring. Since URLs are represented as strings,
urlsafe_base64_encode() should return a string. All uses immediately
decoded the bytestring to a string anyway.

As the inverse operation, urlsafe_base64_decode() accepts a string.
2018-10-10 14:38:22 -04:00
Hasan Ramezani f3d3338e06 Fixed #29829 -- Remove unused code in contrib.sites.models._simple_domain_name_validator(). 2018-10-09 20:50:00 -04:00
Hasan Ramezani b5d7604cb0 Completed FixedOffset test coverage. 2018-10-09 20:32:08 -04:00
Sergey Fedoseev 3957f767bb Simplified handling of DurationField values on MySQL/MariaDB. 2018-10-09 10:38:42 -04:00
Jon Dufresne e90af8bad4 Capitalized "Python" in docs and comments. 2018-10-09 09:26:07 -04:00
Jon Dufresne 31c0348687 Fixed postgres_tests.test_signals.OIDTests when run in isolation. 2018-10-09 09:23:36 -04:00
Jon Dufresne 1e87c9fe71 Replaced kwargs.pop() with keyword-only arguments. 2018-10-08 15:06:02 -04:00
Jon Dufresne 2ba588e773 Refs #27795 -- Removed force_text() usage in db/models/sql/query.py. 2018-10-08 14:47:01 -04:00
Jon Dufresne 4ab071f43c Refs #27795 -- Removed force_bytes() usage in contrib/staticfiles/storage.py. 2018-10-05 09:26:28 -04:00
Eric Brandwein b0b4aac555 Fixed #29775 -- Fixed URL converters in a nested namespaced path.
When using include() without namespaces of some urlpatterns that
have an include() with namespace, the converters of the parent
include() weren't being used to convert the arguments of reverse().
2018-10-04 11:42:27 -04:00
Kate Berry b8b1d8cad6 Improved tone in docs/ref/settings.txt. 2018-10-04 11:35:19 -04:00
Jon Dufresne 5a23a285de Used skip(If|Unless)DBFeature in transactions tests. 2018-10-04 10:09:06 -04:00
Jon Dufresne 9f6d0c11eb Removed Jinja2 dependency from admin_checks tests. 2018-10-04 16:05:22 +02:00
Jon Dufresne f5d9ee11a2 Refs #27778 -- Removed "The database API" section from "Unicode data" docs.
Support for passing bytestrings to the database API was removed in
301de774c2.
2018-10-04 09:10:20 -04:00
Jon Dufresne 9b508bdb9b Removed unnecessary skipUnless in HTTPSitemapTests.
contrib.sites is included in INSTALLED_APPS by SitemapTestsBase.
2018-10-04 08:50:18 -04:00
Sergey Fedoseev 277017aea4 Simplified utils.text.StreamingBuffer. 2018-10-04 08:28:03 -04:00
ovalseven8 d093e01ec0 Clarified when QuerySet.select_for_update() locks. 2018-10-03 15:29:33 -04:00
Adam Johnson 18e4ade79e Fixed #28034 -- Updated the contributing tutorial to use an imaginary ticket. 2018-10-03 14:34:25 -04:00
Jon Dufresne bdae19cf63 Refs #27795 -- Removed force_bytes() usage in sessions.
SessionBase.decode() is the inverse operation to SessionBase.encode().
As SessionBase.encode() always returns a string, SessionBase.decode()
should always be passed a string argument. Fixed the file backend, which
was the only backend still passing a bytestring.
2018-10-03 11:11:42 +02:00
Jon Dufresne efd8a82e26 Refs #27795 -- Removed force_bytes() usage in MySQL backend.
The mysqlclient cursor attribute `_last_executed` is always stored as
bytes. Decode it.

TextField values are already type str. No need to decode.
2018-10-03 10:37:36 +02:00
Jon Dufresne 3212008ba6 Corrected docs to say that all templates are text strings.
Support for bytestring templates was removed in
3a148f958d.
2018-10-03 10:05:17 +02:00
Stefano Chiodino 6de7f9ec60 Fixed #29598 -- Deprecated FloatRangeField in favor of DecimalRangeField. 2018-10-02 19:17:23 -04:00
Simon Charette bc7e288ca9 Fixed #29745 -- Based Expression equality on detailed initialization signature.
The old implementation considered objects initialized with an equivalent
signature different if some arguments were provided positionally instead of
as keyword arguments.

Refs #11964, #26167.
2018-10-02 19:15:20 -04:00
Sergey Fedoseev e4df8e6dc0 Simplified contrib.admin.utils.unquote(). 2018-10-02 15:42:56 -04:00
Nick Pope bf8b625a3b Refs #29722 -- Added introspection of materialized views for PostgreSQL. 2018-10-02 14:02:04 -04:00