django tempate filter for converting python types to javascript types