How to format Form Field title with the appropriate currency in Python/Django?
I have a a form where a form field's title includes a currency amount
class MyForm(form.Forms):
currency_field = forms.BooleanField()
def __init__(self, *args, **kwargs):
super(MyForm, self).__init__(*args开发者_C百科, **kwargs)
self.fields['currency_field'].widget.attrs = {'title':'By checking this field, you can avail our services for $75'}
You can see that I have hardcoded $75 into this. Is there way to format this in the local currency.
精彩评论