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/66CAAEC2-9C17-43F8-8915-24AC69FFE43B%40de-martino.it.
For more options, visit https://groups.google.com/d/optout.

Reply via email to