I have create a generic view and in that view I have specified 
context_object_name of errata_id_list in this case.  This generic view is tied 
to a query set of a model and in the view I specify the list of keys I would 
like to display.  Here is a snippit from the template:


{% for record in errata_id_list %}
<tr>
    {% for key in keys %}
        <td>{{record|dict_lookup:key}}</td>
    {% endfor %}
<</tr>
{% endfor %}

The template tag file dict_lookup is:

def dict_lookup(dict, key):
      return dict[key]
register.filter('dict_lookup',dict_lookup)


The odd thing is that the parameter "record" when passed to the template tag 
file seems to resolve to the primary key of the object.  I am expecting the 
parameter "record" to be a dictionary containing all fields within a record.

Is there anyway to get this within the template.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/LcBesDR2N3oJ.
To post to this group, send email to django-users@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