Re: Generic template; determining information about calling view/app

2015-05-10 Thread Gergely Polonkai
gt; > I have been separating my templates for inheritance clarity. I have a > generic template 'category_list.html'. This can be used by different apps > because the layout is the same. > > What I need to do in order to use appropriate links in the template is to > find out:

Generic template; determining information about calling view/app

2015-05-08 Thread David
Hi Sorry if this is confusing, it's the best I can describe. I have been separating my templates for inheritance clarity. I have a generic template 'category_list.html'. This can be used by different apps because the layout is the same. What I need to do in order to use appro

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

2008-09-15 Thread SnappyDjangoUser
d) > > >     # Get the number of objects. > >     paginator = Paginator(latest_object_list, 0) > >     result_count = paginator._get_count() > > >     t = loader.get_template('object_list.html') > >     c = Context({ > >         'ObjectName': Name

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

2008-09-12 Thread Norman Harman
result_count = paginator._get_count() > > t = loader.get_template('object_list.html') > c = Context({ > 'ObjectName': NameDictionary[model], > 'latest_object_list': latest_object_list, > 'result_count': r

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

2008-09-11 Thread SnappyDjangoUser
'ObjectName': NameDictionary[model], 'latest_object_list': latest_object_list, 'result_count': result_count, }) return HttpResponse(t.render(c)) I am planning on using a generic template (object_list.html) to print the data in a tabular format. How ca

Generic Template

2007-04-25 Thread Moses Ting
Hello DJ Users, I'm trying to write a generic template where I can auto-populate a html table depending on which model I use. So for example the view does something like this: def genericView(request, model): context = {} fields = model._meta.fields fieldNames = []

Re: Generic Template

2007-04-24 Thread robin_percy
On Apr 24, 10:58 am, Moses Ting <[EMAIL PROTECTED]> wrote: > Hello DJ Users, > > I'm trying to write a generic template where I can auto-populate a > html table depending on which model I use. So for example the view > does something like this: > >