Dear Experts, following the indications of Collin I was able to see the extra fields I wanted to show in the change list view. But there's a little problem. The character size of the labels of the readonly_fields are bigger than those of the printed fields so that the visual effect is that the labels and their relating fields don't look aligned (see the attached png file). How can I modify the size of readonly_fields characters? Ciao Vittorio
Il giorno 21/ott/2014, alle ore 19:24, Vittorio ha scritto: > Great, it works! > Thanks a lot Collin > Ciao from Rome > Vittorio > Il giorno 21/ott/2014, alle ore 18:00, Collin Anderson ha scritto: > >> Hi Vittorio, >> >> Would this work? >> >> class OperationAdmin(admin.ModelAdmin): >> list_display = ('patient','date_of_operation') >> fields = ('patient', 'patient_address', 'patient_city_zip', >> 'date_of_operation') >> readonly_field = ['patient_address', 'patient_city_zip'] >> inlines= [DetailsInline] >> order_by= ['-date_of_operation'] >> >> def patient_address(self, operation): >> return operation.patient.address >> >> def patient_city_zip(self, operation): >> return '%s %s' % (operation.patient.city, operation.patient.zipcode) >> >> Collin >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0FE333F3-7AC4-46AB-8760-18124FB6153E%40gmail.com. For more options, visit https://groups.google.com/d/optout.