3
0
Fork 0

Compare commits

...

4 commits

5 changed files with 20 additions and 5 deletions

View file

@ -5,6 +5,13 @@ All notable changes to wuttaweb will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## v0.27.5 (2026-02-13)
### Fix
- use wutta hint from model if present, for rows title
- fix UUID column code generator for new app table wizard
## v0.27.4 (2026-02-08)
### Fix

View file

@ -6,7 +6,7 @@ build-backend = "hatchling.build"
[project]
name = "WuttaWeb"
version = "0.27.4"
version = "0.27.5"
description = "Web App for Wutta Framework"
readme = "README.md"
authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}]

View file

@ -816,9 +816,9 @@
} else if (dataType.type == 'Numeric') {
return `sa.Numeric(precision=${'$'}{dataType.precision}, scale=${'$'}{dataType.scale})`
} else if (dataType.type == 'UUID') {
return `UUID()`
return `model.UUID()`
} else if (dataType.type == '_fk_uuid_') {
return `UUID()`
return `model.UUID()`
} else if (dataType.type == '_other_') {
return dataType.literal
} else {

View file

@ -416,8 +416,6 @@ class MasterView(View): # pylint: disable=too-many-public-methods
This is optional; see also :meth:`get_row_grid_columns()`.
This is optional; see also :meth:`get_row_grid_columns()`.
.. attribute:: rows_viewable
Boolean indicating whether the row model supports "viewing" -
@ -3795,6 +3793,11 @@ class MasterView(View): # pylint: disable=too-many-public-methods
if hasattr(cls, "row_model_title"):
return cls.row_model_title
if model_class := cls.get_row_model_class():
if hasattr(model_class, "__wutta_hint__"):
if model_title := model_class.__wutta_hint__.get("model_title"):
return model_title
return cls.get_row_model_name()
@classmethod

View file

@ -363,6 +363,11 @@ class TestMasterView(WebTestCase):
with patch.object(mod.MasterView, "row_model_class", new=MyModel):
self.assertEqual(mod.MasterView.get_row_model_title(), "Dinosaur")
# model class may have wutta hint
MyModel.__wutta_hint__ = {"model_title": "T-Rex"}
with patch.object(mod.MasterView, "row_model_class", new=MyModel):
self.assertEqual(mod.MasterView.get_row_model_title(), "T-Rex")
def test_get_row_model_title_plural(self):
# error by default (since no model class)