You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are no similar issues or pull requests for this yet.
Is your feature related to a problem? Please describe.
Decimals tend to be displayed as 0e-10 everywhere (reference for potential research: django had this problem)
I'm working around this issue by making my own ModelView, this fixes the value in table views.
from sqladmin.formatters import BASE_FORMATTERS
class ModelView(ModelView):
column_type_formatters = BASE_FORMATTERS | {Decimal: float} # type: ignore
But issue remains within edit/creating forms, something like form_type_formatters would fix it there as well.
Describe the solution you would like.
form_type_formatters that works like existing column_type_formatters, but for the edit/create form.
Describe alternatives you considered
Possibly adding {Decimal: float} to BASE_FORMATTERS would prevent other people from having similar issue in future (for the table issue, not the form issue though, I haven't figured out that one yet)
Additional context
No response
The text was updated successfully, but these errors were encountered:
Checklist
Is your feature related to a problem? Please describe.
Decimals tend to be displayed as 0e-10 everywhere (reference for potential research: django had this problem)
I'm working around this issue by making my own ModelView, this fixes the value in table views.
But issue remains within edit/creating forms, something like form_type_formatters would fix it there as well.
Describe the solution you would like.
form_type_formatters that works like existing column_type_formatters, but for the edit/create form.
Describe alternatives you considered
Possibly adding {Decimal: float} to BASE_FORMATTERS would prevent other people from having similar issue in future (for the table issue, not the form issue though, I haven't figured out that one yet)
Additional context
No response
The text was updated successfully, but these errors were encountered: