On 23-8-2012 18:56, miked wrote:
> 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.
Nope, the expected thing is that record resolves to a model instance.
> I am expecting the parameter "record" to be a dictionary containing
> all fields within a record.
What part of the docs gave you that idea? Maybe it needs clarification.
> Is there anyway to get this within the template.
def attr_lookup(obj, attr):
return getattr(obj, attr, "")
register.filter('attr_lookup', attr_lookup)
--
Melvyn Sopacua