Hi there,

I'm overriding an admin template (but doubt uf that is particularly
relevent) and am not sure why the following behaviour occurs.

I've modified the line:

{% if inline_admin_form.original %}{{ inline_admin_form.original }}{%
endif %}

to be:

{% if inline_admin_form.original
%}test1{{ inline_admin_form.original }} {% else %}test2{% endif %}

This is in a inline tabular fieldset so I can display the text 'Please
add another item' in the row of the table that represents the blank
new item rather than an existing one. "inline_admin_form.original"
contains the text of the existing item. I would expect any empty rows
to display test2 or at least show test1 if for some reason an expty
value still evaluated to True but instead they show nothing.

So we have a test that fails an 'if' and doesn't pass the else? Or am
I missing something more obvious here?

The file I'm overriding is:
newforms-admin\django\contrib\admin\templates\admin\edit_inline
\tabular.html


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to