{"action":"created","issue":{"url":"https://api.github.com/repos/oTree-org/otree-core/issues/269","labels_url":"https://api.github.com/repos/oTree-org/otree-core/issues/269/labels{/name}","comments_url":"https://api.github.com/repos/oTree-org/otree-core/issues/269/comments","events_url":"https://api.github.com/repos/oTree-org/otree-core/issues/269/events","html_url":"https://github.com/oTree-org/otree-core/issues/269","id":54053127,"number":269,"title":"CurrencyField: form widget doesn't show current value of the field","user":{"login":"oTree-org","id":5423929,"avatar_url":"https://avatars.githubusercontent.com/u/5423929?v=3","gravatar_id":"","url":"https://api.github.com/users/oTree-org","html_url":"https://github.com/oTree-org","followers_url":"https://api.github.com/users/oTree-org/followers","following_url":"https://api.github.com/users/oTree-org/following{/other_user}","gists_url":"https://api.github.com/users/oTree-org/gists{/gist_id}","starred_url":"https://api.github.com/users/oTree-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oTree-org/subscriptions","organizations_url":"https://api.github.com/users/oTree-org/orgs","repos_url":"https://api.github.com/users/oTree-org/repos","events_url":"https://api.github.com/users/oTree-org/events{/privacy}","received_events_url":"https://api.github.com/users/oTree-org/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/oTree-org/otree-core/labels/consultant","name":"consultant","color":"009800"},{"url":"https://api.github.com/repos/oTree-org/otree-core/labels/p1","name":"p1","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"gregmuellegger","id":88278,"avatar_url":"https://avatars.githubusercontent.com/u/88278?v=3","gravatar_id":"","url":"https://api.github.com/users/gregmuellegger","html_url":"https://github.com/gregmuellegger","followers_url":"https://api.github.com/users/gregmuellegger/followers","following_url":"https://api.github.com/users/gregmuellegger/following{/other_user}","gists_url":"https://api.github.com/users/gregmuellegger/gists{/gist_id}","starred_url":"https://api.github.com/users/gregmuellegger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregmuellegger/subscriptions","organizations_url":"https://api.github.com/users/gregmuellegger/orgs","repos_url":"https://api.github.com/users/gregmuellegger/repos","events_url":"https://api.github.com/users/gregmuellegger/events{/privacy}","received_events_url":"https://api.github.com/users/gregmuellegger/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-01-12T13:27:05Z","updated_at":"2015-01-12T22:25:06Z","closed_at":null,"body":"Repro steps:\r\n\r\nIn models.py, put this in the `Player` class:\r\n\r\n```\r\nmy_currency_field = models.CurrencyField(default=10)\r\n```\r\n\r\nThen, in the views.py, put this in a Page class:\r\n\r\n```\r\n    form_model = models.Player\r\n    form_fields = ['my_currency_field']\r\n```\r\n\r\nAnd put this in the HTML template:\r\n\r\n```\r\n{% formrow form.my_currency_field %}\r\n```\r\n\r\nExpected: the form widget should display the current value of the ($10), as it does for integer fields\r\nActual: the form widget is blank\r\n\r\nNote, the change page in the admin correctly displays the current value of the field in the form widget, it's just in oTree's ModelForms that it is wrong."},"comment":{"url":"https://api.github.com/repos/oTree-org/otree-core/issues/comments/69658656","html_url":"https://github.com/oTree-org/otree-core/issues/269#issuecomment-69658656","issue_url":"https://api.github.com/repos/oTree-org/otree-core/issues/269","id":69658656,"user":{"login":"gregmuellegger","id":88278,"avatar_url":"https://avatars.githubusercontent.com/u/88278?v=3","gravatar_id":"","url":"https://api.github.com/users/gregmuellegger","html_url":"https://github.com/gregmuellegger","followers_url":"https://api.github.com/users/gregmuellegger/followers","following_url":"https://api.github.com/users/gregmuellegger/following{/other_user}","gists_url":"https://api.github.com/users/gregmuellegger/gists{/gist_id}","starred_url":"https://api.github.com/users/gregmuellegger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregmuellegger/subscriptions","organizations_url":"https://api.github.com/users/gregmuellegger/orgs","repos_url":"https://api.github.com/users/gregmuellegger/repos","events_url":"https://api.github.com/users/gregmuellegger/events{/privacy}","received_events_url":"https://api.github.com/users/gregmuellegger/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T22:25:05Z","updated_at":"2015-01-12T22:25:05Z","body":"The commit https://github.com/oTree-org/otree-core/commit/be490a1535dd1c5a62a2bf5a542f56bc26daa2c5 contains a test and a fix.\r\nThe problem was, that the currency symbol got rendered with the money value in the html, like: `<input type=\"number\" value=\"€12.34\" />`. The browser didn't like this as number value and therefore ignored the value."}}