#29589: Insert a new method part_page_range for class Page in django.core.paginator.py ------------------------------+-------------------------------------- Reporter: BobDu | Owner: BobDu Type: New feature | Status: assigned Component: Core (Other) | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ------------------------------+--------------------------------------
Comment (by Carlton Gibson): The idea here is to generate a subset of page links for a navigation aid right? Something like (in HTML links): {{{ 1, 2, ... 498, 499, 500, 501, 502, 503, ... 9999, 1000 }}} Rather than just outputting all 1000 links at once. First question is, is this something we should add in core? (Maybe. Not immediately sure what to say.) But more, are there already community solutions that do this. Django REST Framework provides utilities that do just this for the pagination of it's Browsable API templates. (See methods called from [https://github.com/encode/django-rest- framework/blob/f404fda29c3c88e344db20f85cab7c51ef44ccdf/rest_framework/pagination.py#L255-L273 `PageNumberPagination.get_html_context()`].) I imagine there will be other solutions also built around Django's `Paginator`. Before doing anything in core it would be good to consider what those are(?) (Even if that's only for implementation ideas.) -- Ticket URL: <https://code.djangoproject.com/ticket/29589#comment:3> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.0d4a0510d37e37ded8a664dd04905736%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.