1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

10 lines
279 B
Python

from django.db.models import F, Func
class CollateAsChar(Func):
"""
Disregard localization by collating a field as a plain character string. Helpful for ensuring predictable ordering.
"""
function = 'C'
template = '(%(expressions)s) COLLATE "%(function)s"'