Hi,

I was wondering how to read a sparse martrix in a django template. I can 
generate the matrix in the view function, but I cannot seem to get the 
results to come out.

Basic assignment/ format below, not how it is really done though, but 
this is the effective result

matrix[(1,0)] = 1
matrix[(1,1)] = 2
matrix[(1,2)] = 3
matrix[(2,0)] = 4
matrix[(2,1)] = 5
matrix[(2,2)] = 6

How would I get the template language to understand this. It seems to 
tie itself in a knot when I use {{ matrix.(1,0) }}

The follow on question to this, is can the first number be a variable, 
thereby cutting the template size down?

eg {{ matrix.({{ order }},0) }}, this particular format does fail though.

Thanks in advance


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to