On Aug 15, 3:16 pm, adelaide_mike <[email protected]> wrote:
> OK, and thanks. I asked the wrong question in that case. The correct
> question might be how do I transfer the data in the returned rows,
> which is several columns from various tables, into distinct fields on
> a rendered page? I am assuming that this process will remove the
> Python unicode indicators.
>
> I have not found more than a paragraph or two concerning the use of
> raw sql. Any pointers would be appreciated.
>
> Thanks
> Mike
Well presumably it's just a list or tuple, in which case you can
iterate through in exactly the same way as anything else:
{% for item in sql %}
{{ item }}
{% endfor %}
If you've got more than one row, ie a list of lists, then just nest
the loops:
{% for row in sql %}
{% for item in row %}
{{ item }}
{% endfor %}
{% endfor %}
Add HTML tags as required.
--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---