diff options
| author | Carl Meyer <carl@oddbird.net> | 2014-11-17 18:05:14 -0700 |
|---|---|---|
| committer | Carl Meyer <carl@oddbird.net> | 2014-11-18 19:47:16 -0700 |
| commit | 08fbbaa45b7b3f3a811b33c6bdf4222acd21d0b0 (patch) | |
| tree | 1ae8cd4c0afc4a9df5e0de87b78e8d09a7232bc4 /docs | |
| parent | d63703f1cd373f2a1d52e1947835b44d9565c1e0 (diff) | |
Deprecated calling a SQLCompiler instance.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rw-r--r-- | docs/releases/1.8.txt | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 666ff1f492..2a1839ba13 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -15,6 +15,9 @@ about each item can often be found in the release notes of two versions prior. See the :ref:`Django 1.8 release notes<deprecated-features-1.8>` for more details on these changes. +* Support for calling a ``SQLCompiler`` directly as an alias for calling its + ``quote_name_unless_alias`` method will be removed. + * ``cycle`` and ``firstof`` template tags will be removed from the ``future`` template tag library (used during the 1.6/1.7 deprecation period). diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index bf6e9d3516..9520f84686 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -1049,6 +1049,20 @@ loader that inherits ``BaseLoader``, you must inherit ``Loader`` instead. Private API ``django.test.utils.TestTemplateLoader`` is deprecated in favor of ``django.template.loaders.locmem.Loader``. +``qn`` replaced by ``compiler`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In previous Django versions, various internal ORM methods (mostly ``as_sql`` +methods) accepted a ``qn`` (for "quote name") argument, which was a reference +to a function that quoted identifiers for sending to the database. In Django +1.8, that argument has been renamed to ``compiler`` and is now a full +``SQLCompiler`` instance. For backwards-compatibility, calling a +``SQLCompiler`` instance performs the same name-quoting that the ``qn`` +function used to. However, this backwards-compatibility shim is immediately +deprecated: you should rename your ``qn`` arguments to ``compiler``, and call +``compiler.quote_name_unless_alias(...)`` where you previously called +``qn(...)``. + .. removed-features-1.8: Features removed in 1.8 |
