Open
Conversation
sbdchd
reviewed
Sep 16, 2025
Owner
sbdchd
left a comment
There was a problem hiding this comment.
Yeah seems good, if you want to test it, you can add some code inside https://github.com/sbdchd/django-types/blob/main/tests/trout/models.py and the type checker will make sure it works with the types!
Author
|
Will do. Had an unrelated question - I'm using grep for searching across codebase, and the |
Owner
|
Oh I think that's a remnant of how the project used to be structured, there was like a dupe folder that was symbolic linked to another folder so you'd get dupes in vscode without the |
kodiakhq bot
pushed a commit
that referenced
this pull request
Oct 18, 2025
See #332 for a previous PR related to this. I have made the following changes: 1. I have made sure to reflect the latest up-to-date signature of `Field.__init__()`, except those fields that are explicitly not supported by `GeneratedField`. 2. I have added tests in the `trout` test app. 3. I have typed the setter as `Never`, as it does not make sense to set values on these fields, as they are overwritten in the database. This might be the most controversial choice. 4. I have not mixed in `Combinable` in the setter because of 3. 5. Made the field available through `django.db.models.GeneratedField` in addition to `django.db.models.fields.generated.GeneratedField`. Thanks!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GeneratedFieldwas added in Django 5.0. I am making this pull request as a draft as I'd like to find out how to contribute to this repository (would love to also document that in aCONTRIBUTING.md).I based this on
JSONFieldimplementation and main changes were taken based on the__init__in source: