I have a template that has 3 non-contiguous areas.   I need to display 
the results of a query set across these three areas.
My initial solution was to split up the query set in the template using 
"slice". For example:

{% for object in object_list|slice:"1:6" %}area one {% endfor %}
{% for object in object_list|slice:"6:9" %}area two {% endfor %}
etc

My problem is that this is not working with pagination correctly when 
the pagination returns less than the initial slice ( in this case 6).  I 
get the following errors (see below).

Can anybody suggest how to avoid this? Many thanks

MerMer



Caught an exception while rendering.{% for object in 
object_listslice:"3:6" %}
Exception Type: ProgrammingError
Exception Value: (1064, "You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right 
syntax to use near '-1' at line 1")
Exception Location: C:\Python24\Lib\site-packages\MySQLdb\connections.py 
in defaulterrorhandler, line 35

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