is there a way to paginate a rawqueryset using django's inbuilt pagination? when i cast it to a list , it throws an error in my face ...TypeError: expected string or Unicode object, NoneType found. Is there a way around this?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Django __str__ returned non-string (type NoneType)
- Evil ctypes hack in python
You can set the attribute count manually for your RawQuerySet object:
for @Rockallite
I managed to achieve it using the following:
The code in django.core.paginator.py:
len on a raw_queryset doesn't work but converting the actual paginator object to a list works find for me in Django 1.3