Q:

How to localize list_display fields in Django admin?

I have float fields in the list_display of an ModelAdmin class, and I'd like them to be displayed localized (like 1.000,00). I already have USE_L10N and USE_I18N to True, but that's not enough.
The current solution I have is the following:
from django.utils import formats

class MyAdmin(admin.ModelAdmin):
   list_display = ('localized_myfield')

   def localized_myfield(self, instance):
       return formats.localize(instance.myfield)

That works, but defining one method for each float field I have looks like a lot of unnecessary code. Is there a simpler way to do this?

A:

I found the answer after some research. To achieve what I want, three things are necessary:

USE_L10N=True in settings.py
USE_THOUSAND_SEPARATOR in settings.py
myfield = forms.DecimalField(localize=True) in forms.py (I finally realized that DecimalField was better choice than Floatfield in my case)

