Re: formatting values list

2010-07-21 Thread Nick
Perfect, thanks On Jul 21, 4:50 pm, n3ph wrote: >  Definitely the better way.. > > On 07/21/10 23:42, Franklin Einspruch wrote: > > > Nick, > > > I think you're looking for this: > > >http://docs.djangoproject.com/en/dev/howto/outputting-csv/ > > > Franklin > > > On Wed, Jul 21, 2010 at 5:38 PM,

Re: formatting values list

2010-07-21 Thread n3ph
Definitely the better way.. On 07/21/10 23:42, Franklin Einspruch wrote: > Nick, > > I think you're looking for this: > > http://docs.djangoproject.com/en/dev/howto/outputting-csv/ > > Franklin > > > On Wed, Jul 21, 2010 at 5:38 PM, Nick wrote: >> I would like to format the output of a values_li

Re: formatting values list

2010-07-21 Thread n3ph
maybe this way: from django.shortcuts import get_list_or_404 from MY_APP.models * def values_view(request) list = get_list_or_404(MyModel) template = loader.get_template('mytemp.html') c = Context({'list': list}) html = t.render(c) HttpResponse(html) Template: {% for item

Re: formatting values list

2010-07-21 Thread Franklin Einspruch
Nick, I think you're looking for this: http://docs.djangoproject.com/en/dev/howto/outputting-csv/ Franklin On Wed, Jul 21, 2010 at 5:38 PM, Nick wrote: > I would like to format the output of a values_list into something a > little more usable for a CSV. > > My view is really simple > > def va

formatting values list

2010-07-21 Thread Nick
I would like to format the output of a values_list into something a little more usable for a CSV. My view is really simple def values_view(request) list = MyModel.objects.values_list('id', 'name', 'type') template = loader.get_template('mytemp.html') c = Context({'list': list}) ht