Hi, please share your view class.
Cheers
On Thursday, 23 August 2012 18:56:37 UTC+2, miked wrote:
>
> 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/-/S-03r-cVRjEJ.
To post to this group, send email to [email protected].
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.