Skip to content

Conversation

arthanson
Copy link
Contributor

@arthanson arthanson commented Sep 17, 2025

Refactor, cleanup and simplify a lot of the code around get_model and field_types:

  • Separated out get_serializer_class from get_model to avoid recursion issues
  • Added init.ready to register the serializers on startup
  • Removed generating_models stuff in field_types and models, with a previous change to prevent circular dependencies and the change to get_serializer_class this should no longer be needed. This simplifies and cleans up the code quite a bit.
  • removed fields, manytomany_models, no_cache, _generating_models params from get_model. With the code cleanup these should no longer be needed. no_cache was removed as it shouldn't be needed and cache should always be used.
  • views had a set of change to call the get_serializer_class as it is no longer being called in get_model.

@arthanson arthanson marked this pull request as ready for review September 17, 2025 20:48
@arthanson arthanson changed the title DRAFT: Get object refactor 2 get_model / field_types refactor Sep 17, 2025
@arthanson arthanson requested a review from bctiemann September 17, 2025 20:49
@bctiemann bctiemann merged commit 9b33510 into main Sep 18, 2025
5 checks passed
@arthanson arthanson deleted the get-object-refactor-2 branch September 19, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants