Skip to main content

Unaccent

This class provides a database transformation that removes accents and diacritics from strings. It functions as a bilateral transform, allowing for unaccented comparisons and lookups within database queries.

Attributes

AttributeTypeDescription
bilateralboolean = TrueIndicates that the transformation can be applied to both the field and the lookup value for comparison.
lookup_namestring = unaccentThe identifier used in query expressions to apply the unaccent transformation.
functionstring = UNACCENTThe database function name used to remove diacritics from strings in SQL queries.

Constructor

Signature

def Unaccent()

Methods


unaccent()

def unaccent() - > [Transform](../../../db/models/lookups/transform.md?sid=django_db_models_lookups_transform)

Applies the PostgreSQL UNACCENT function to a field, removing diacritics and accents from characters for normalized text comparison.

Returns

TypeDescription
[Transform](../../../db/models/lookups/transform.md?sid=django_db_models_lookups_transform)A Transform object that represents the unaccented version of the input field.