You can either create a custom widget and
ModelAdmin.formfield_overrides [1] or (if you need to customize the
data processing as well as the display, create a custom form and use
ModelAdmin.form [2].

[1] 
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_overrides
[2] 
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.form

On Nov 28, 10:10 am, jough <jough.demp...@gmail.com> wrote:
> I'd like to add a derived field to a default ModelAdmin.fieldsets like
> I would by specifying a method and adding it to the
> ModelAdmin.list_display property, but there doesn't seem to be an easy
> way to do that (if there is ANY way to do that).
>
> The default Django Admin list view seems to have a lot more options
> than the change form view does.
>
> Let's say I have two fields for a location: latitude and longitude,
> and instead of displaying them on a change form I want to display a
> Google Maps Static Map image instead - I already have a method that
> will return the src url for the image - I just need a way to add that
> image to the model change form instead of showing those two fields.
>
> The documentation says you can add custom views to the admin forms,
> but provides no guidance or examples, and I really just want to add a
> derived field to a single model, not every instance of the change form
> view.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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