OneToOne
class¶
saffier.OneToOneField
¶
OneToOneField(to, null=False, on_delete=RESTRICT, on_update=CASCADE, related_name=None, **kwargs)
Bases: ForeignKey
Representation of a one to one field.
PARAMETER | DESCRIPTION |
---|---|
to |
TYPE:
|
null |
TYPE:
|
on_delete |
TYPE:
|
on_update |
TYPE:
|
related_name |
TYPE:
|
**kwargs |
TYPE:
|
Source code in saffier/core/db/fields/base.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
|
ForeignKeyValidator
¶
ForeignKeyValidator(*, title='', description='', help_text='', default=NO_DEFAULT, null=False, read_only=False, **kwargs)
Bases: SaffierField
PARAMETER | DESCRIPTION |
---|---|
title |
TYPE:
|
description |
TYPE:
|
help_text |
TYPE:
|
default |
TYPE:
|
null |
TYPE:
|
read_only |
TYPE:
|
**kwargs |
TYPE:
|
Source code in saffier/core/db/fields/_internal.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
__hash__
¶
__hash__()
Source code in saffier/core/datastructures.py
19 20 21 22 23 24 25 26 27 |
|
validate_or_error
¶
validate_or_error(value)
PARAMETER | DESCRIPTION |
---|---|
value |
TYPE:
|
Source code in saffier/core/db/fields/_internal.py
59 60 61 62 63 64 |
|
has_default
¶
has_default()
Source code in saffier/core/db/fields/_internal.py
66 67 |
|
validation_error
¶
validation_error(code, value=None)
PARAMETER | DESCRIPTION |
---|---|
code |
TYPE:
|
value |
TYPE:
|
Source code in saffier/core/db/fields/_internal.py
69 70 71 72 73 |
|
get_error_message
¶
get_error_message(code)
PARAMETER | DESCRIPTION |
---|---|
code |
TYPE:
|
Source code in saffier/core/db/fields/_internal.py
75 76 |
|
get_default_value
¶
get_default_value()
Source code in saffier/core/db/fields/_internal.py
78 79 80 81 82 |
|
check
¶
check(value)
PARAMETER | DESCRIPTION |
---|---|
value |
TYPE:
|
Source code in saffier/core/db/fields/base.py
270 271 |
|
get_validator
¶
get_validator(**kwargs)
PARAMETER | DESCRIPTION |
---|---|
**kwargs |
TYPE:
|
Source code in saffier/core/db/fields/base.py
305 306 |
|
get_column_type
¶
get_column_type()
Source code in saffier/core/db/fields/base.py
91 92 |
|
get_constraints
¶
get_constraints()
Source code in saffier/core/db/fields/base.py
94 95 |
|
expand_relationship
¶
expand_relationship(value)
PARAMETER | DESCRIPTION |
---|---|
value |
TYPE:
|
Source code in saffier/core/db/fields/base.py
324 325 326 327 328 |
|
raise_for_non_default
¶
raise_for_non_default(default, server_default)
PARAMETER | DESCRIPTION |
---|---|
default |
TYPE:
|
server_default |
TYPE:
|
Source code in saffier/core/db/fields/base.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
get_column
¶
get_column(name)
PARAMETER | DESCRIPTION |
---|---|
name |
TYPE:
|
Source code in saffier/core/db/fields/base.py
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
|