Add "one_to_many", "one_to_one", "many_to_many," and "many_to_one" attributes to Field base class (#449)

* Add "_to_many" and "_to_one" bool attributes to Field base class.

* Remove unused import from test case.
This commit is contained in:
James Perretta authored and GitHub committed 2020-08-24 23:09:15 +03:00
1 parent 6ef2cf0331
commit 95252cde60
2 files changed
+30

No files matched your search

@@ -56,6 +56,10 @@ class Field(RegisterLookupMixin, Generic[_ST, _GT]):
remote_field: Field
is_relation: bool
related_model: Optional[Type[Model]]
one_to_many: Optional[bool] = ...
one_to_one: Optional[bool] = ...
many_to_many: Optional[bool] = ...
many_to_one: Optional[bool] = ...
max_length: int
model: Type[Model]
name: str