@carlton @nessita That's a really well written post! Thank you for sharing!
I've also seen solutions to similar issues where there's a custom model field that removes the particular property in the `deconstruct` method. I've found this helpful when having a choice field map to a specific class of functionality.
@CodenameTim @nessita 🤔 #interesting
Now you have to write that up too! 😜
@carlton Boom! Only took me 2 months. https://www.better-simple.com/django/2023/10/03/registerfields-in-django/
@CodenameTim @carlton Nice post, thank you for writing it up. I’ve seen this pattern many times too. 😃
I think I spotted a couple of fixes for the post:
1. The example models should call RegisterField.with_property() instead of RegisterField() . (Threw me at first.)
2. The first example has:
assert isinstance(source, RSSBackend)
instead of:
assert isinstance(source.backend, RSSBackend)
3. In the paragraph starting “The class SourceBackend...” you’ve used double backticks instead of single.
@adamchainz Thank you for the fixes! They are going out now.
@CodenameTim @carlton @nessita
Does posting a link count as writing it up? 😅
@matthiask @CodenameTim @nessita It’ll do for a start certainly! 😅