Answering my own question in case somebody else would help:

The formatting for admin templates does not use the registered filters but 
contents is directly processed by library functions. In this case 
product/admin.py method ProductOptions.formatted_price calls 
l10n.utils.moneyfmt instead of currency filter.

Had to monkey-patch moneyfmt function to get consistent results across the 
whole app.

On Friday, March 1, 2013 12:40:29 PM UTC+1, David Unric wrote:
>
> Hi,
>
> having custom filter for currency values registered in 
> localsite.templatetags.satchmo_currency.py
> from django import template
>
> register = template.Library()
>
> # Add THOUSAND_SEPARATOR support to the original currency filter
> @register.filter(is_safe=True)
> def currency(value, args=""):
>     " here is a method's code
>
> The custom filter _works_ in unmodified Satchmo templates but in the 
> Administration interface is simply ignored. For example at uri 
> http://localhost:8000/admin/product/product/ there is a column Unit Price 
> but currency filter is not applied.
>
> Any idea how to make it work in the admin interface also ?
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/satchmo-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to