Changes between Initial Version and Version 2 of Ticket #35641
- Timestamp:
- Jul 30, 2024, 3:49:22 AM (4 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35641 – Description
initial v2 28 28 }}} 29 29 30 The implementation for this is fairly straight-forward, add this to models.Model.30 Since __match_args__ must be a tuple, the attribute must be generated inside a metaclass. 31 31 32 {{{#!python32 ~~{{{#!python 33 33 @property 34 34 def __match_args__(self) -> tuple[str, ...]: 35 35 return tuple(f.name for f in self._meta.get_fields()) 36 }}} 36 }}}~~ 37 37 38 38 Happy to create a PR if this is interesting.