Hi all,

I assume there a way of accessing associated values from a ForeignKey
object in the fieldset.html template that comes with the newforms-
admin branch? I cannot for the life of me figure it out - HELP!

example:

<fieldset class="module aligned {{ fieldset.classes }}">
  {% if fieldset.name %}<h2>{{ fieldset.name }}</h2>{% endif %}
  {% if fieldset.description %}<div
class="description">{{ fieldset.description }}</div>{% endif %}
  {% for line in fieldset %}
      {% for field in line %}
          {% ifequal field.field.name "designset" %}
              {{ field.field.form.initial.designset }}           <!--
***** I can print out the designset id ***** -->
          {% else %}
              {% if field.is_checkbox %}
                  {{ field.field }}{{ field.label_tag }}
              {% else %}
                  {{ field.label_tag }}{{ field.field }}
              {% endif %}
          {% endifequal %}
      {% endfor %}
      </div>
  {% endfor %}
</fieldset>

In the above example I can print out the designset id
{{ field.field.form.initial.designset }} but cannot figure out how to
get at any of the values associated with this foreignkey table
(DesignSet table contains priority, status & project fields)

Can anyone put me out of my misery?

Regards,

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