I've written a currency filter that takes the 3 letter code of a
currency and gives you the price.

{{ product.price|currency:"EUR" }}

There's a context variable called CURRENCY which specifies the current
session's currency.

I'm not able to pass that variable in the filter itself instead of a
string, so I'm curious how to make this happen.

I don't want to do it in the model level (maybe defining a OneToMany
with each currency to price), so I'm wondering if working on a
middleware, `process_view` or something would be the right place to
make the conversion.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to