Questions tagged [django-pagination]

Django-pagination refers to the Django (a Python-based and open-source web framework) way of managing data split across several pages, with "Previous/Next" links. Use this tag for questions related to classes related to pagination in Django.

Django-pagination refers to the Django (a Python-based and open-source web framework) way of managing data split across several pages, with "Previous/Next" links. Use this tag for questions related to classes related to pagination in Django.

300 questions
0
votes
1 answer

Django FormMixin does not render Form

I had following FormView which worked for what I wanted to do back then: class LearningObjectiveView( LoginRequiredMixin, FormView ): form_class = LearningObjectiveForm template_name = 'learningobjective' success_url = reverse_lazy(…
0
votes
2 answers

Filtering is not happening with the pagination

I have added pagination in my view. The pagination is working fine but when I am filtering my data and navigate to the next page it is not paginating through the filtered data, it goes to the next page where the filtering is not happening. views …
0
votes
2 answers

Django pagination after POST

I'm fairly new to Class Based Views and I have a problem. I implemented get_queryset to return all my users (for testing) and they are returned and pagination works fine (outside get_queryset, I do have "paginate_by" field set). A user can then…
dnmh
  • 2,045
  • 2
  • 34
  • 49
0
votes
1 answer

Django Blog Pagination Pages

I have this view function for my blog posts. def home(request): posts = Post.objects.all().order_by("-pub_date") paginator = Paginator(posts, 5) try: page = int(request.GET.get("page", 1)) except ValueError: page = 1 try:…
codemax
  • 1,322
  • 10
  • 19
0
votes
1 answer

Django Pagination Issue

I wanna show pagination for my objects that has specific foreign key, with help of documentation, I'm using this: def baslik_handle(request, title): baslik, created = Baslik.objects.get_or_create(title=title) entryler2 =…
malisit
  • 1,253
  • 2
  • 17
  • 36
0
votes
0 answers

pagination shows same results on every page in django

I have the following view that gets and paginates search results: def search(request): query=request.GET.get('q','') form=SearchForm({'q': query }) results = form.search() paginator = Paginator(results, 15) print 'page is:…
Atma
  • 29,141
  • 56
  • 198
  • 299
0
votes
2 answers

Django comments pagination isnt working

there is a trouble I'm new to django and there is an issue I can't understand, there is a view: def article(request, article_id = 1, comments_page_number = 1): all_comments = Comments.objects.filter(comments_article_id = article_id) …
0
votes
1 answer

Translate django default ?page=1 to ?side=1 (Norwegian)

Im trying to find a way to change django default ?page=1 to ?side=1, or maybe better, /side/1 This is my listview: class EntryListView(ListView): context_object_name = "news_list" paginate_by = 18 queryset =…
Tomas Jacobsen
  • 2,368
  • 6
  • 37
  • 81
0
votes
1 answer

Exception Value: request' in Django

I have the django code running with 1.3.1 version, and recently i updated it to django 1.6.1 and cleared most of the errors like direct_to_template functions and some settings etc., and can be able to run the site. But for some pages i am getting…
Shiva Krishna Bavandla
  • 25,548
  • 75
  • 193
  • 313
0
votes
2 answers

Django: How to return user to correct pagination page after CreateView form_invalid?

I have a paginated comments page. Pagination is provided by django-endless-pagination. When clicking to new paginated pages a get parameter is append to the url. Such as ?page=4. Each comment on each paginated page displays a 'reply to' comment form…
pymarco
  • 7,807
  • 4
  • 29
  • 40
0
votes
1 answer

Jump to page in Django

Alright, here is what I want to do: A user sees a number of assignments in a table, with each assignment paginated using paginator. A user can input a number in a field and click "go", he is then taken to the page. Here's my code so far: View: def…
LukasKawerau
  • 1,071
  • 2
  • 23
  • 42
0
votes
1 answer

How to create proper NEXT & PREV buttons for retrieving next & prev objects in Django

I would like to put NEXT & PREV links to my detail page to get easily to Previous or Next item. I dont want to do it with DATE or ID, because it is totally impractical. I dont want to…
0
votes
1 answer

Django Pagination corrupted all the paths to all the .css and .js elements

I was looking to use django-pagination, and I applied all the changes to settings.py after installing django=pagination but when I ran my server and accesssed the page, pagination has arrived for sure, but it broke all the paths to css and js…
Indradhanush Gupta
  • 4,067
  • 10
  • 44
  • 60
0
votes
0 answers

Django - Pagination not working with custom SQL query

I'm a little bit without clues on why I can't get the pagination working is this situation. I've done a custom SQL query in a view. def latest_comments_view(request): from django.db import connection, transaction from django.core.paginator…
André
  • 24,706
  • 43
  • 121
  • 178
0
votes
1 answer

Django ManyToMany relationship to queryset to pagination?

Here is the relevant code: models.py class Blog(models.Model): ... images = models.ManyToManyField('myapp.Image') class Image(models.Model): ... title = models.CharField(max_length=60, blank=True, null=True) image =…
1 2 3
19
20