Hi everybody there! :-)

I have a decimal field and I wish I could use a comma as a separator
between the integer and the decimal part (according to my country
habit).

How do you think I can manage that?

I found this snippet [0], which seems promising. The thing is, I need
to use that field in my admin backend and I don't know how to
integrate that snippet in my admin.

Here comes a stripped-down version of my models.py:

###
class Product(models.Model):
    name = models.CharField(max_length=30)
    value = models.DecimalField(max_digits=10, decimal_places=2, default="0.00")

class ProductAdmin(admin.ModelAdmin):
    list_display = ('name','value')

admin.site.register(Product, ProductAdmin)
###

Thanks for your help,
cheers,
Fabio.

[0] http://www.djangosnippets.org/snippets/643/

-- 
Fabio Natali

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to