create AmountField #57101

Closed
opened 2018-10-08 15:11:36 +02:00 by Sybren A. Stüvel · 2 comments

Currently the admin shows separate currency and 'xxx_in_cents' fields. It would be so much nicer if admin users could simply enter 'normal' amounts, so 14.90 instead of 1490, and currencies were shown at each field containing an amount.

The AmountField class would take care of:

  • Taking the currency from the currency property of the model instance.
  • Converting between database (cents as int) and string (float-formatted amount).
Currently the admin shows separate currency and 'xxx_in_cents' fields. It would be so much nicer if admin users could simply enter 'normal' amounts, so `14.90` instead of `1490`, and currencies were shown at each field containing an amount. The `AmountField` class would take care of: - Taking the currency from the `currency` property of the model instance. - Converting between database (cents as int) and string (float-formatted amount).
Author
Owner

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Author
Owner

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sybren A. Stüvel self-assigned this 2018-10-30 16:21:00 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/devfund-website#57101
No description provided.