Monday, 15 April 2013

python - How to display value of inline formset in django admin change_form.html -



python - How to display value of inline formset in django admin change_form.html -

i have 3 inline models in parent modeladmin. wish display value of field 'contact' nowadays in 1 of inline models in parent modeladmin. in change_form.html of django admin:

{% block inline_field_sets %} {% inline_admin_formset in inline_admin_formsets %} {% ifequal inline_admin_formset.formset.prefix 'client_executive' %} {{ inline_admin_formset.formset.form.contact }} {% endifequal%} {% include inline_admin_formset.opts.template %} {% endfor %} {% endblock %}

this not show value of populated 'contact' value in form in template. inline model has attribute extra=2. displays nothing. mistake? how can access value easily? using django 1.6.5

i think have typo, in django source found this: {% inline_admin_form in inline_admin_formset %} have additional 's' {% inline_admin_formset in inline_admin_formsets %}

python django

No comments:

Post a Comment