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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:16:54+00:00 2026-06-09T19:16:54+00:00

I am new to Django and Python. I am trying to implement infinite scroll

  • 0

I am new to Django and Python. I am trying to implement infinite scroll on an html page but can’t seem to figure it out. I am using the django-endless-pagination module and going for the twitter-style (with Pagination on scroll) from here

I’ve installed django-endless-pagination, added the request context processor in my settings.py file, and added endless_pagination in my installed_apps in my settings.py file.

I can paginate but can’t seem to figure out how to do the infinite scroll.

My views.py is:

from endless_pagination.decorators import page_template
from models import PeoplePerson
from django.shortcuts import render_to_response, RequestContext

@page_template("people/entry_index_page.html") # just add this decorator
def entry_index(request, template="people/entry_index.html",
    extra_context=None):
    context = {
        'objects': PeoplePerson.objects.all(),
    }
    if extra_context is not None:
        context.update(extra_context)
    return render_to_response(template, context,
        context_instance=RequestContext(request))

entry_index.html is:

{% extends 'people/entry_index_page.html' %} {# is this line right????? #}
{% block js %}
   {% {{ block.super }} %}
    <script src="/mypathto/jquery.js" type="text/javascript" charset="utf-8"></script>
    <script src="/mypathto/endless.js" type="text/javascript" charset="utf-8"></script>
    <script src="/mypathto/endless_on_scroll.js" type="text/javascript" charset="utf-8"></script>

    <script type="text/javascript" charset="utf-8">
    var endless_on_scroll_margin = 20;
    </script>
{% endblock %}

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

and entry_index_page.html is:

{% load endless %}
{% paginate objects %}
{% for object in objects %}
 {{ object.name|upper }} <br>   
{% endfor %}
{% show_more %}

UPDATE: I was able to overcome the “‘BlockNode’ object has no attribute ‘context'” error by adding “{% extends ‘people/entry_index_page.html’ %}” to entry_index.html. Not sure if this is the right way…I couldn’t find it in the docs anywhere, just from another SO question asked.

  • 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-09T19:16:56+00:00Added an answer on June 9, 2026 at 7:16 pm

    I figured it out:
    1. set my media_root and media_url and make sure javascript works

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

Sidebar

Related Questions

I'm new to Python and trying to figure out Django 1.3's class-based generic views.
I'm new to Django (and Python), and am trying to figure out how to
i'm new to django and im trying add a user using django admin page.
I'm new to Django (and Python) and I have been trying to work out
I'm fairly new to both Django and Python. This is my first time using
Hi all im new to django and python trying to install bcrypt which is
Im new to django and python, trying to run a piece of django code
im new to django and python , im trying to do runserver on a
I'm very new to python and trying to run a piece of Django code
Python 2.7.1 / Django 1.3 I am new to Django Templates and trying to

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.