Grantlee frustrations

Tomaz Canabrava tcanabrava at kde.org
Mon Jan 23 08:29:52 PST 2017


On Mon, Jan 23, 2017 at 5:20 PM, Martin Long <martin at longhome.co.uk> wrote:

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

I think this could be a grantlee issue -
If you have a bit of time, can you write what you think it would be the
correct implementation on the template and send me so I can poke subsurface
internals or a new grantlee library to se if it works?

Thanks.

Tomaz


>
> Thanks
>
>
> Martin
>
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170123/777986a1/attachment.html>


More information about the subsurface mailing list