MCPcopy
hub / github.com/django/django / get_prep_value

Method get_prep_value

django/contrib/postgres/fields/ranges.py:94–101  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

92 return f"%s::{db_type}", (value,)
93
94 def get_prep_value(self, value):
95 if value is None:
96 return None
97 elif isinstance(value, Range):
98 return value
99 elif isinstance(value, (list, tuple)):
100 return self.range_type(value[0], value[1])
101 return value
102
103 def to_python(self, value):
104 if isinstance(value, str):

Callers 3

get_prep_valueMethod · 0.45
get_prep_lookupMethod · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected