@@ -196,6 +196,10 @@ <h4 class="title">FastAdmin</h4>
196196
197197 < ul class ="nav flex-column ">
198198
199+ < li class ="nav-item ">
200+ < a class ="nav-link " href ="#v0_3_9 "> v0.3.9</ a >
201+ </ li >
202+
199203 < li class ="nav-item ">
200204 < a class ="nav-link " href ="#v0_3_8 "> v0.3.8</ a >
201205 </ li >
@@ -339,7 +343,7 @@ <h1>FastAdmin | Documentation</h1>
339343 < div class ="row ">
340344 < div class ="col-sm-6 col-lg-4 ">
341345 < ul class ="list-unstyled ">
342- < li > < strong > Version:</ strong > 0.3.8 </ li >
346+ < li > < strong > Version:</ strong > 0.3.9 </ li >
343347 < li >
344348 < strong > Author:</ strong >
345349 < a href ="
mailto:[email protected] "
target ="
_blank "
> @@ -2110,7 +2114,7 @@ <h3>Methods and Attributes</h3>
21102114 # @action(
21112115 # description="Mark selected stories as published",
21122116 # )
2113- # async def make_published(self, objs: list[Any]) -> None:
2117+ # async def make_published(self, objs: list[Any]) -> ActionResponseSchema | None:
21142118 # ...
21152119 actions: Sequence[str] = ()
21162120
@@ -2463,7 +2467,14 @@ <h3>Methods and Attributes</h3>
24632467 :params attributes_to_serizalize: a list of attributes to serialize.
24642468 :return: A dict of serialized attributes.
24652469 """
2466- serialized_dict = {field.name: getattr(obj, field.column_name) for field in attributes_to_serizalize}
2470+ serialized_dict: dict[str, Any] = {}
2471+ for field in attributes_to_serizalize:
2472+ value = getattr(obj, field.column_name)
2473+ if isinstance(value, Decimal):
2474+ # Avoid scientific notation for Decimal values in API responses,
2475+ # e.g. 3.75E+3 -> "3750"
2476+ value = format(value, "f")
2477+ serialized_dict[field.name] = value
24672478 if inspect.iscoroutinefunction(obj.__str__):
24682479 str_fn = obj.__str__
24692480 else:
@@ -3365,6 +3376,49 @@ <h2>Changelog</h2>
33653376
33663377
33673378
3379+ < section id ="v0_3_9 ">
3380+ < h3 > v0.3.9</ h3 >
3381+
3382+
3383+
3384+ < p class ="text-4 ">
3385+ Add response types for actions.
3386+ </ p >
3387+
3388+
3389+
3390+
3391+
3392+
3393+
3394+
3395+
3396+
3397+
3398+
3399+
3400+
3401+
3402+ < p class ="text-4 ">
3403+ Fix Decimal fields handling.
3404+ </ p >
3405+
3406+
3407+
3408+
3409+
3410+
3411+
3412+
3413+
3414+
3415+
3416+
3417+
3418+
3419+ </ section >
3420+
3421+
33683422 < section id ="v0_3_8 ">
33693423 < h3 > v0.3.8</ h3 >
33703424
0 commit comments