Hi,
Do you use Class Based View ?

Sent from Mail for Windows 10

From: leb dev
Sent: Wednesday, September 25, 2019 2:32 PM
To: Django users
Subject: where is the error in pagination?

i have a django project  and it includes pagination i do not know where is the 
error in my code but once i tired to go to the next or previous page it crash 
and display the below error :

> can only concatenate str(not ""NoneType) to str

            query=request.GET.get("search")
            paginator = Paginator(queryset_list, 5) 
            page_request_var = "page"
            print("page_request_var===>",page_request_var)
            page = request.GET.get(page_request_var)
            print("page===>",page)
            queryset = paginator.get_page(page)
            print("queryset===>",queryset)

When i print **page** it display None


 In the browser it suppose to display **page=2&search=sam**
but instead 
it display **/?=2&20search%20=%20sam**
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/82e3fe0e-e872-4a49-b869-2b67001e3270%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5d8b498a.1c69fb81.2757b.7648%40mx.google.com.

Reply via email to