Re: Accessing field names and data from a queryset in a generic template

2008-09-15 Thread SnappyDjangoUser
Thanks for the feedback. Yes, the field names are different for each model and that is why I asked the question. I had solved the problem with your suggestion #2: "Create base template and extend that with model specific templates." But I did not find this to be a very efficient way to solve the

Re: Accessing field names and data from a queryset in a generic template

2008-09-12 Thread Norman Harman
SnappyDjangoUser wrote: > I am a new django user so please excuse my naive question. > > I have a generic view function (see below) which is used to perform a > query on one of many tables (depending on the "model" argument) and > then render the results to a single template file (object_list.htm

Accessing field names and data from a queryset in a generic template

2008-09-11 Thread SnappyDjangoUser
I am a new django user so please excuse my naive question. I have a generic view function (see below) which is used to perform a query on one of many tables (depending on the "model" argument) and then render the results to a single template file (object_list.html) def item_list(request, model='