-
-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for custom django fields (#1109)
Using exclusively `django.db.fields.Field.get_internal_type` to determine which Pydantic field to use in the built schemas makes it difficult to create custom django fields. This PR adds support for a new method `get_schema_type`, which allows using `get_internal_type` for its intended purpose (determining database column types, etc.), while at the same time allowing specifying which Pydantic schema field to use.
- Loading branch information
1 parent
9ff32ec
commit d61837d
Showing
2 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters