plain.models 0.49.0__py3-none-any.whl → 0.49.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
plain/models/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # plain-models changelog
2
2
 
3
+ ## [0.49.1](https://github.com/dropseed/plain/releases/plain-models@0.49.1) (2025-09-29)
4
+
5
+ ### What's changed
6
+
7
+ - Fixed `get_field_display()` method to accept field name as string instead of field object ([1c20405](https://github.com/dropseed/plain/commit/1c20405ac3))
8
+
9
+ ### Upgrade instructions
10
+
11
+ - No changes required
12
+
3
13
  ## [0.49.0](https://github.com/dropseed/plain/releases/plain-models@0.49.0) (2025-09-29)
4
14
 
5
15
  ### What's changed
plain/models/base.py CHANGED
@@ -665,8 +665,10 @@ class Model(metaclass=ModelBase):
665
665
  collector.collect([self])
666
666
  return collector.delete()
667
667
 
668
- def get_field_display(self, field):
668
+ def get_field_display(self, field_name: str) -> str:
669
669
  """Get the display value for a field, especially useful for fields with choices."""
670
+ # Get the field object from the field name
671
+ field = self._meta.get_field(field_name)
670
672
  value = getattr(self, field.attname)
671
673
 
672
674
  # If field has no choices, just return the value as string
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.models
3
- Version: 0.49.0
3
+ Version: 0.49.1
4
4
  Summary: Model your data and store it in a database.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-File: LICENSE
@@ -1,9 +1,9 @@
1
1
  plain/models/AGENTS.md,sha256=xQQW-z-DehnCUyjiGSBfLqUjoSUdo_W1b0JmwYmWieA,209
2
- plain/models/CHANGELOG.md,sha256=f-zsBeKsovIyXp5YozHM7Fz8ujJS1II-oF2POrLSrAQ,19875
2
+ plain/models/CHANGELOG.md,sha256=zZeR5QuIb6G-lpmlyCcSsta_Fk_G516D7nY7TkMomms,20192
3
3
  plain/models/README.md,sha256=lqzWJrEIxBCHC1P8X1YoRjbsMFlu0-kG4ujP76B_ZO4,8572
4
4
  plain/models/__init__.py,sha256=t6scDQ-bGQD3k-U_DE9K5JJ3pnmkC7ZHchFnWA-BcW8,2845
5
5
  plain/models/aggregates.py,sha256=P1nAyp1XORdlx1D-__Nx9AehUeuKmcjeS6heqjB7A7k,7247
6
- plain/models/base.py,sha256=7fN3nPpO1vlE8eJ7C26g_kaoo2kImujmturCkpnAc2w,63835
6
+ plain/models/base.py,sha256=-eaUUAnLTPMckmO2PrIfWsqXSQAhOIZFwD_i7DrcI1I,63952
7
7
  plain/models/cli.py,sha256=rqrgG__OyqtaDaKLB6XZnS6Zv7esU9K9EAyKCO35McA,39548
8
8
  plain/models/config.py,sha256=-m15VY1ZJKWdPGt-5i9fnMvz9LBzPfSRgWmWeEV8Dao,382
9
9
  plain/models/connections.py,sha256=RBNa2FZ0x3C9un6PaYL-IYzH_OesRSpdHNGKvYHGiOM,2276
@@ -115,8 +115,8 @@ plain/models/sql/where.py,sha256=P_2EFg-BMIu9jTZFiiPwz1E74jlSitiP-taShCp5OhU,126
115
115
  plain/models/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
116
116
  plain/models/test/pytest.py,sha256=KD5-mxonBxOYIhUh9Ql5uJOIiC9R4t-LYfb6sjA0UdE,3486
117
117
  plain/models/test/utils.py,sha256=S3d6zf3OFWDxB_kBJr0tDvwn51bjwDVWKPumv37N-p8,467
118
- plain_models-0.49.0.dist-info/METADATA,sha256=QulZ-TJtNAyutLdHzWvvhGNaZ5uayc3hgl3VFycIgzw,8884
119
- plain_models-0.49.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
120
- plain_models-0.49.0.dist-info/entry_points.txt,sha256=IYJAW9MpL3PXyXFWmKmALagAGXC_5rzBn2eEGJlcV04,112
121
- plain_models-0.49.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
122
- plain_models-0.49.0.dist-info/RECORD,,
118
+ plain_models-0.49.1.dist-info/METADATA,sha256=ZGN3wPRNBPZcLfhw3SkUIBTXPObUL1Onb96Pd1OdrqY,8884
119
+ plain_models-0.49.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
120
+ plain_models-0.49.1.dist-info/entry_points.txt,sha256=IYJAW9MpL3PXyXFWmKmALagAGXC_5rzBn2eEGJlcV04,112
121
+ plain_models-0.49.1.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
122
+ plain_models-0.49.1.dist-info/RECORD,,