> Den 11. jan. 2016 kl. 23.21 skrev Jonty Needham <jontyneed...@gmail.com>:
> 
> I have a ModelAdmin class where I am using callables to define accessors to a 
> foreign key's field.
> 
> I.e.
> 
> class MyAdmin(admin.ModelAdmin):
> 
>     def field_name(self, obj):
>         return obj.fk.field_name
> 
>     readonly_fields=(field_name, other_field)
> 
> 
> Ultimately I need to translate the labels, but I need access to them first 
> and I can't see from the ModelAdmin code where that is.

It sounds like you're looking for the 'short_description' option described in 
https://docs.djangoproject.com/en/1.9/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display

Erik

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9E3DD769-26A9-4DD5-A1D7-08327ECB5358%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to