Grantlee frustrations

Martin Long martin at longhome.co.uk
Mon Jan 23 08:20:08 PST 2017


Sorry... emailing here as a last resort.

Grantlee seems to have a very limited implementation of Django. Such that
it seems impossible to do what I'm trying to do.

I want to essentially reorder the dives as follows...

0 2 4 6 3 1 7 5 and then continuing that sequence 8 + x , 16 + x etc.


This is to achieve the correct ordering for 4 dives per page, double sided,
so when the pages are cut, the correct dives share front and back (0+1,
 2+3, 4+5, etc).


I've tried using a cycle,


<!--{% cycle 0 2 4 6 3 1 7 5 as dv %}-->

and then looking up the dive as dives.dv and dives[dv] but these don't seem
to be supported.


it seems impossible to assign anything to a variable using "with"


regroup seems to work, but I can't get anything useful from the result of
it, and I can't also express my ordering to it.

Is this going to require some coding in Subsurface to support this kind of
ordering?

Thanks


Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170123/cc4bc36d/attachment.html>


More information about the subsurface mailing list