Index: django/views/generic/list_detail.py
===================================================================
--- django/views/generic/list_detail.py	(revision 4229)
+++ django/views/generic/list_detail.py	(working copy)
@@ -5,9 +5,9 @@
 from django.core.exceptions import ObjectDoesNotExist
 
 def object_list(request, queryset, paginate_by=None, page=None,
-        allow_empty=False, template_name=None, template_loader=loader,
-        extra_context=None, context_processors=None, template_object_name='object',
-        mimetype=None):
+        allow_empty=False, surrounding_pages=0, template_name=None,
+        template_loader=loader, extra_context=None, context_processors=None,
+        template_object_name='object', mimetype=None):
     """
     Generic list of objects.
 
@@ -33,6 +33,9 @@
             number of pages, total
         hits
             number of objects, total
+        page_list
+            a list of containing the a list of page numbers surrounding and
+            including the current page
     """
     if extra_context is None: extra_context = {}
     queryset = queryset._clone()
@@ -48,6 +51,16 @@
                 object_list = []
             else:
                 raise Http404
+        if surrounding_pages:
+            surround_start = page-surrounding_pages
+            surround_end = page+surrounding_pages
+            if surround_start < 1:
+                surround_start = 1
+            if surround_end > paginator.pages:
+                surround_end = paginator.pages
+            page_list = range(surround_start, surround_end+1)
+        else:
+            page_list = []
         c = RequestContext(request, {
             '%s_list' % template_object_name: object_list,
             'is_paginated': paginator.pages > 1,
@@ -59,6 +72,7 @@
             'previous': page - 1,
             'pages': paginator.pages,
             'hits' : paginator.hits,
+            'page_list': page_list
         }, context_processors)
     else:
         c = RequestContext(request, {
Index: docs/generic_views.txt
===================================================================
--- docs/generic_views.txt	(revision 4229)
+++ docs/generic_views.txt	(working copy)
@@ -706,6 +706,9 @@
       the view will raise a 404 instead of displaying an empty page. By
       default, this is ``False``.
 
+    * **New in Django development version** ``surrounding_pages``: The number
+      of pages on either side of the current page to include in ``page_list``.
+
     * ``context_processors``: A list of template-context processors to apply to
       the view's template. See the `RequestContext docs`_.
 
@@ -757,6 +760,10 @@
     * ``hits``: The total number of objects across *all* pages, not just this
       page.
 
+    * **New in Django development version** ``page_list``: A 1-based ordered
+      list of page numbers surrounding and including the current page. Empty if
+      ``surrounding_pages`` is zero.
+
 Notes on pagination
 ~~~~~~~~~~~~~~~~~~~
 
