Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3306172
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:15:25+00:00 2026-05-17T21:15:25+00:00

As mentioned in the title, my paginator doesn’t show anything when I click to

  • 0

As mentioned in the title, my paginator doesn’t show anything when I click to go to a page beyond the first.
First, let me describe my page in general:
Its function is to get a request input from the user specifying the period interval from which he wants to see a bunch of “call records” along with other filters (this is important). So essentially there’s a start and end date from the request and I use it to filter my objects.
The link to “page2” is something like: “localhost:8000/?page=2” and redirects to my existing page but without any data. It’s obvious now that the link to the next page should include the other parameters such as start_date=xxxx-xx-xx, or else it wouldn’t work.

Here’s part of my view.py and I took out a lot of lines to make it brief, the code runs fine:

if request.GET:   
    filter_form = ReportFilterForm(request.GET)
    if filter_form.is_valid():
        start = filter_form.cleaned_data["start_date"]
        end = filter_form.cleaned_data["end_date"]  

        #a bunch of omitted lines that use the form to filter
        paginator = Paginator(queryset, 100)

        try:
            page = int(request.GET.get('page', '1'))
        except ValueError:
            page = 1
        try:
            call_logs = paginator.page(page)
        except (EmptyPage, InvalidPage):
            call_logs = paginator.page(paginator.num_pages)
else:
    filter_form = ReportFilterForm()
return render_to_response('xxxx.html', 
                          {'queryset': queryset,
                           'filter_form': filter_form,
                           'call_logs': call_logs, 
                           })

My template xxxx.html, just the paginator section, which is pretty standard, taken from the documentation:

                {% if call_logs.paginator.num_pages %}
                <div class="pagination">
                    <span class="step-links">
                        {% if call_logs.has_previous %}
                            <a href="**{{ SOME_MAGIC_TEMPLATE_VARIABLE_THAT_GETS_CURRENT_ABSOLUTE_URL}}**&?page={{ call_logs.previous_page_number }}"><<</a>
                        {% endif %}
                        <span class="current">
                            Page {{ call_logs.number }} of {{ call_logs.paginator.num_pages }}
                        </span>
                                {% if call_logs.has_next %}
                                      <a href=" **{{ SOME_MAGIC_TEMPLATE_VARIABLE_THAT_GETS_CURRENT_ABSOLUTE_URL}}**&page={{ call_logs.next_page_number }}">>></a>
                                {% endif %}
                    </span>
                </div>
                {% endif %}

My question is how do I get the current window URL using django templates and not javascript?
Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:15:25+00:00Added an answer on May 17, 2026 at 9:15 pm

    You could add the full path to the context from the request object if I understand you correctly:

    return render_to_response('xxxx.html', 
                              {'queryset': queryset,
                               'filter_form': filter_form,
                               'call_logs': call_logs,,
                               'magic_url': request.get_full_path(),
                               })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am actually working on this mentioned title. player show the list, its generating
As mentioned in the title, Mac OS X doesn't allow me to name files
As the title mentioned, I want to encode a Image Obj into some kind
Would what mentioned in the title be possible? Python module style that is. See
As I have mentioned in the title, my dispatch_async is firing 10 times. And
I'm getting the error mentioned in the title and not sure what exactly I
I am trying to Google for what I've mentioned in the title, but somehow
I'm using jEdit 4.3 pre 16. As I've mentioned on the title, when I'm
as mentioned in title. Another details: file is in on my hard drive in
As mentioned in the title, how do I implement such a functionality? I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.