mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-22 03:28:45 -06:00
Create CachedValueField to contain search specific lookups
This commit is contained in:
committed by
Jeremy Stretch
parent
a61e7e7c04
commit
eed1b8f412
@@ -1,5 +1,5 @@
|
||||
from django.db.models import CharField, TextField, Lookup
|
||||
|
||||
from .fields import CachedValueField
|
||||
|
||||
class Empty(Lookup):
|
||||
"""
|
||||
@@ -27,4 +27,4 @@ class NetContainsOrEquals(Lookup):
|
||||
return 'CAST(%s as inet) >>= %s' % (lhs, rhs), params
|
||||
|
||||
CharField.register_lookup(Empty)
|
||||
TextField.register_lookup(NetContainsOrEquals)
|
||||
CachedValueField.register_lookup(NetContainsOrEquals)
|
||||
|
||||
Reference in New Issue
Block a user