mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
[4.2.x] Refs #34140 -- Applied rst code-block to non-Python examples.
Thanks to J.V. Zammit, Paolo Melchiorre, and Mariusz Felisiak for
reviews.
Backport of 534ac48297 from main.
This commit is contained in:
committed by
Mariusz Felisiak
parent
4a89aa25c9
commit
b784768eef
@@ -23,7 +23,9 @@ extension using the
|
||||
operation.
|
||||
|
||||
The ``trigram_similar`` lookup can be used on
|
||||
:class:`~django.db.models.CharField` and :class:`~django.db.models.TextField`::
|
||||
:class:`~django.db.models.CharField` and :class:`~django.db.models.TextField`:
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> City.objects.filter(name__trigram_similar="Middlesborough")
|
||||
['<City: Middlesbrough>']
|
||||
@@ -47,7 +49,9 @@ extension using the
|
||||
operation.
|
||||
|
||||
The ``trigram_word_similar`` lookup can be used on
|
||||
:class:`~django.db.models.CharField` and :class:`~django.db.models.TextField`::
|
||||
:class:`~django.db.models.CharField` and :class:`~django.db.models.TextField`:
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> Sentence.objects.filter(name__trigram_word_similar='Middlesborough')
|
||||
['<Sentence: Gumby rides on the path of Middlesbrough>']
|
||||
@@ -91,7 +95,9 @@ operation is available if you want to perform this activation using migrations).
|
||||
.. _unaccent extension on PostgreSQL: https://www.postgresql.org/docs/current/unaccent.html
|
||||
|
||||
The ``unaccent`` lookup can be used on
|
||||
:class:`~django.db.models.CharField` and :class:`~django.db.models.TextField`::
|
||||
:class:`~django.db.models.CharField` and :class:`~django.db.models.TextField`:
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> City.objects.filter(name__unaccent="México")
|
||||
['<City: Mexico>']
|
||||
|
||||
Reference in New Issue
Block a user