Skip to main content

An attempt to add pagination to Django Model Formsets.

Project description

Latest Version

An attempt to add pagination to Django Model Formsets.


  • Python 2.6+ or Python 3
  • Django 1.6+


Install from PyPI

pip install django-paginated-modelformset


from django.forms.models import modelformset_factory
from paginated_modelformset import PaginatedModelFormSet
from myapp.models import MyModel

MyModelFormSet = modelformset_factory(MyModel, formset=PaginatedModelFormSet)

# In addition to standard arguments, provide a number of items per page and a page number.
formset = MyModelFormSet(per_page=25, page_num=1)

PaginatedModelFormSet uses the same Paginator class that is used for standard pagination. A Page object is accessible as a page attribute of the formset and you can use it in templates like this:

<div class="pagination">
    <span class="step-links">
        {% if %}
            <a href="?page={{ }}">previous</a>
        {% endif %}

        <span class="current">
            Page {{ }} of {{ }}.

        {% if %}
            <a href="?page={{ }}">next</a>
        {% endif %}


See this StackOverflow question for an alternative solution.

Project details

Release history Release notifications

This version
History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-paginated-modelformset-0.0.2.tar.gz (4.4 kB) Copy SHA256 hash SHA256 Source None Jan 9, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page