mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Removed redundant lookup name in register_lookup() calls.
This commit is contained in:
@@ -739,7 +739,7 @@ It can also be registered as a transform. For example::
|
||||
|
||||
>>> from django.db.models import CharField
|
||||
>>> from django.db.models.functions import Length
|
||||
>>> CharField.register_lookup(Length, 'length')
|
||||
>>> CharField.register_lookup(Length)
|
||||
>>> # Get authors whose name is longer than 7 characters
|
||||
>>> authors = Author.objects.filter(name__length__gt=7)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user