Socket
Socket
Sign inDemoInstall

django-paginated

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    django-paginated

Simple django digg-style pagination.


Maintainers
1

Readme

django-paginated

Installation

pip install django-paginated

and add paginated to project's INSTALLED_APPS

Example

To add pagination just change from:

def events(request):
    events = Event.objects.all()

    context = {
        'events': events,
    }
    return render_to_response(request, 'events.html', context)

to

def events(request):
    events, pagination = paginated(Event.objects.all(), request)

    context = {
        'events': events,
        'pagination': pagination,
    }
    return render_to_response(request, 'events.html', context)

and in template add line:

{{ pagination|safe }}

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc