Wednesday, February 24, 2010

Passing directory structure to template extending change_form

I have a template which extends change_form.html and I want to display
the same directory links that change_form.html displays. However, I'm
not sure which dictionary values to pass in to accomplish this. The
breadcrumbs section is:

<div class="breadcrumbs">
<a href="../../../">{% trans "Home" %}</a> &rsaquo;
<a href="../../">{{ app_label|capfirst|escape }}</a> &rsaquo;
{% if has_change_permission %}<a
href="../">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}
{{ opts.verbose_name_plural|capfirst }}{% endif %} &rsaquo;

If I pass in {'app_label': MyAppName} then I get: Home > MyAppName >

But I can't seem to fill in the next step. What do I call the key to
pass this in? I tried opts and it doesn't work.

I want the output to look like this:

Home > MyAppName > Subdirectory

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate