Hi All,
I need to pass the "totalItems" value as argument to Paginator(disp,
totalItems) function
if It is POST.
But it throws the error
"coercing to Unicode: need string or buffer, int found"
How do I rectify it.
Thanks....
def detail(request, gallery_slug, page=0):
if request.method == 'POST':
totalItems = request.POST['quantity']
else:
totalItems = 6
gallery = get_object_or_404(Gallery, slug__iexact=gallery_slug)
disp = Photo.objects.filter(gallery=gallery)
paginator = Paginator(disp, totalItems)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---