It seems that modifying context['adminform'].form.instance or obj in
render_change_form has no impact on the rendered html.
Where does the admin interface take the values to display from?


On Tue, Jul 13, 2010 at 10:28, Massimiliano della Rovere
<massimiliano.dellarov...@gmail.com> wrote:
> I need to "decode" the value of the fields of ModelAdmin.form so that,
> for some fields, the int value is translated in a string showing its
> meaning.
> I do not want to implement this in the Model class (using
> Model.to_python or Model.formfield for example), because the
> information displayed in the columns of changelist_view page are
> enough for the 90% of the times, so I prefer to do the extra work
> necessary to generate the strings only when requested thus avoiding
> the overhead necessary to select the correct string to be wasted in
> most cases.
>
> So I was in doubt whether to override the ModelAdmin,get_form or some
> _get_val_from_obj for some fields from the ModelAdmin.form.
>
> Which one is more correct in your opinion?
>

-- 
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