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,
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
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
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
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
5 matches
Mail list logo