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 7959269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:32:48+00:00 2026-06-04T04:32:48+00:00

I was trying to use django-endless-pagination twitter pagination , but Django is throwing and

  • 0

I was trying to use django-endless-pagination twitter pagination, but Django is throwing and exception and I’m having trouble debugging it.

After creating these templates:

search_results.html:

<h2>Entries:</h2>
{% include page_template %}

results.html:

{% for object in objects %}
    {# your code to show the entry #}
{% endfor %}

I added them to my projects template directory. I then create this view:

def search(request):
    if 'q' in request.GET:  #Need to add input variable to html code
        q = request.GET['q']
        if q:
            stuff = Stuff.objects.filter(name__icontains=q)
            template = "search_results.html"
            page_template = "results.html"
            if request.is_ajax():
                template = page_template
            return render_to_response(template, locals())
    return render_to_response('search_page.html')

When I go to the results url I get:
Exception Type: TemplateDoesNotExist

Exception Location: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/loader.py in find_template, line 138

Template-loader postmortem

Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
/Users/some_account/Dropbox/code/project/project/html (File exists)
/Users/some_account/Dropbox/code/project/project/course_database/templates (File exists)
Using loader django.template.loaders.app_directories.Loader:
/Users/some_account/Dropbox/code/project/project/course_database/templates (File exists)
/Library/Python/2.7/site-packages/endless_pagination/templates (File exists)
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/templates (File exists)
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/admin/templates (File exists)
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/admindocs/templates (File exists)

And the error during template loading is located at a line that includes: {% include page_template %}

Why would I be getting this exception, and how can I fix it?

  • 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-06-04T04:32:49+00:00Added an answer on June 4, 2026 at 4:32 am

    In your search_results.html page, you have {% include page_template %}, and I assume you are using locals() to pass it into the template. Can you output it on the template to verify what page_template‘s value is? Put {{ page_template }} in place of {% include page_template %} to verify it is getting the correct url.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use Django with jquery UI autocomplete but having trouble sending
I am getting cannot import name connections exception while trying to use django-multilingual-ng 0.1.20
I'm trying to use django-multilingual and setup it properly. But what I found is
I'm trying to use the django pagination module including in the standard distribution version
I've been trying to use Django-appengine to write a small web app, but I
I am trying to use django-sitetree but I don't understand how to do step
I'm trying to use django-localeurl in one of my project, but following the docs
Im trying to use django send_email function but it fails on authentication. In fact,
I am trying in use the django phileo(liking app) on my project but I
i am trying to use django comments on my web application but I get

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.