Thanks for your help tim, I had a look at your filter, but I ended up
using the template tag here:

http://www.djangosnippets.org/snippets/660/


The only problem is it requires you to know the length of your list,
and the length of mine varies.

{% load splitlist %}
{% split_list tags as new_list 30 %}
{% for x in new_list.0 %}
{{x.call}}
{{x.date}}
{%endfor%}

{% for x in new_list.1 %}
{{x.call}}
{{x.date}}
{%endfor%}

etc. but im trying to iterate through the length of the list something
like:

length = range(len(tags))

{% load splitlist %}
{% split_list tags as new_list 30 %}
{% for y in length %}
{% for x in new_list.{{y}} %}
{{x.calldate}}
{%endfor%}
{%endfor%}


On Jun 2, 9:46 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > I am building a django-app that pulls call logs from a mysql
> > database and displays reports, I am trying to make the reports
> > printable and I use a CSS that splits them into two columns on
> > the page. I am trying to find a template tag that will split
> > the lists up so that they will fit onto a printed
> > page,something like  "show first 30 lines of list" show next
> > 30 lines of list, The list size and amount of pages depends on
> > the query and how big the list is that is returned.
>
> (sorry...your 2nd message came in right after I pushed <send>)
>
> This sounds more like a need for pagination as described at
>
> http://www.djangoproject.com/documentation/pagination/
>
> If you want them to fit on paper, you run against the odd
> boundary between web and paper, where "N items fit on a page"
> varies based on font-size, margins, etc.
>
> There's some CSS-Print selectors detailed at
>
> http://www.w3.org/TR/css-print/
>
> that might be usable in connection with the columnize filter I
> gave you earlier.  Or you might be able to use the columnize
> filter as a base for something similar.
>
> -tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to