I solved cloning and renaming the templatetag result_list (the rows
builder) and modifying it.
It checks if the field is a number and set the class attribute of the
<td> tag to "numb", so using the admin css i can change alignment
Obviously i had to override change_list.html too to let it load my
custom template tag.....
It works, but i'm surprising that a so common functionality (everywhere
numbers are right justify) needs a so complex customization......
I'm sure to have miss something and there is a simpler way to do it.......
If someone has better idea or solution i'm very happy to know
Thanks anyway to all
On 06/17/2012 02:55 PM, kooliah wrote:
I'm trying to change alignment of the number columns in the
changelist, instead of default left alignment for all, i would like to
have left for the text and right for the numbers.....
Is it possible to do it in the admin.py overriding the default class
or i have to make some filters and apply to the template?
Overriding i can change the format or the column displayed using a
callable, so i tryed to rjust the number (converted to string and
thousand separated) using a function but i think it is trimmed again
later....
Can someone point me in the right direction?
Thanks to all
Kooliah
--
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.