On Mon, Dec 1, 2008 at 4:08 AM, please smile <[EMAIL PROTECTED]>wrote:
> 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) > The full traceback from the error might help people help you. Karen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---