diff -r 41ee28cb9212 django/views/generic/dates.py
--- a/django/views/generic/dates.py	Wed Jun 15 23:52:44 2011 +0000
+++ b/django/views/generic/dates.py	Thu Jun 16 14:10:48 2011 +0200
@@ -208,7 +208,7 @@
         date_field = self.get_date_field()
         allow_empty = self.get_allow_empty()
 
-        date_list = queryset.dates(date_field, date_type)[::-1]
+        date_list = queryset.dates(date_field, date_type)
         if date_list is not None and not date_list and not allow_empty:
             raise Http404(_(u"No %(verbose_name_plural)s available") % {
                     'verbose_name_plural': force_unicode(qs.model._meta.verbose_name_plural)
@@ -239,7 +239,7 @@
         Return (date_list, items, extra_context) for this request.
         """
         qs = self.get_dated_queryset()
-        date_list = self.get_date_list(qs, 'year')
+        date_list = self.get_date_list(qs, 'year')[::-1]
 
         if date_list:
             object_list = qs.order_by('-' + self.get_date_field())
@@ -301,6 +301,7 @@
     """
     List of objects published in a given year.
     """
+
     def get_dated_items(self):
         """
         Return (date_list, items, extra_context) for this request.
diff -r 41ee28cb9212 docs/ref/class-based-views.txt
--- a/docs/ref/class-based-views.txt	Wed Jun 15 23:52:44 2011 +0000
+++ b/docs/ref/class-based-views.txt	Thu Jun 16 14:10:48 2011 +0200
@@ -265,7 +265,10 @@
         A boolean specifying whether to display the page if no objects are
         available. If this is ``False`` and no objects are available, the view
         will raise a 404 instead of displaying an empty page. By default, this
-        is ``True``.
+        is ``True``. This now also applies to all data generated for links on
+        the page, for example the ``next_month`` context variable. These will
+        be ``None`` when ``allow_empty`` is ``False`` and no data is available
+        for the next month. This prevents creating links to non-existing pages.
 
     .. attribute:: model
 
diff -r 41ee28cb9212 tests/regressiontests/generic_views/dates.py
--- a/tests/regressiontests/generic_views/dates.py	Wed Jun 15 23:52:44 2011 +0000
+++ b/tests/regressiontests/generic_views/dates.py	Thu Jun 16 14:10:48 2011 +0200
@@ -6,17 +6,18 @@
 
 from regressiontests.generic_views.models import Book
 
+def _make_books(n, base_date):
+    for i in range(n):
+        b = Book.objects.create(
+            name='Book %d' % i,
+            slug='book-%d' % i,
+            pages=100+i,
+            pubdate=base_date - datetime.timedelta(days=i))
+
 class ArchiveIndexViewTests(TestCase):
     fixtures = ['generic-views-test-data.json']
     urls = 'regressiontests.generic_views.urls'
 
-    def _make_books(self, n, base_date):
-        for i in range(n):
-            b = Book.objects.create(
-                name='Book %d' % i,
-                slug='book-%d' % i,
-                pages=100+i,
-                pubdate=base_date - datetime.timedelta(days=1))
 
     def test_archive_view(self):
         res = self.client.get('/dates/books/')
@@ -64,7 +65,7 @@
         self.assertRaises(ImproperlyConfigured, self.client.get, '/dates/books/invalid/')
 
     def test_paginated_archive_view(self):
-        self._make_books(20, base_date=datetime.date.today())
+        _make_books(20, base_date=datetime.date.today())
         res = self.client.get('/dates/books/paginated/')
         self.assertEqual(res.status_code, 200)
         self.assertEqual(res.context['date_list'], Book.objects.dates('pubdate', 'year')[::-1])
@@ -76,6 +77,12 @@
         self.assertEqual(res.context['page_obj'].number, 2)
         self.assertEqual(list(res.context['latest']), list(Book.objects.all()[10:20]))
 
+    def test_date_list_order(self):
+        """ date_list should be descending in index """
+        _make_books(20, base_date=datetime.date.today())
+        res = self.client.get('/dates/books/')
+        self.assertEqual(list(res.context['date_list']), list(reversed(sorted(res.context['date_list']))))
+
 
 class YearArchiveViewTests(TestCase):
     fixtures = ['generic-views-test-data.json']
@@ -130,6 +137,13 @@
         res = self.client.get('/dates/books/no_year/')
         self.assertEqual(res.status_code, 404)
 
+    def test_date_list_order(self):
+        """ date_list should be ascending in year view """
+        _make_books(35, base_date=datetime.date.today())
+        year = datetime.date.today().year
+        res = self.client.get('/dates/books/%s/' % year)
+        self.assertEqual(list(res.context['date_list']), list(sorted(res.context['date_list'])))
+
 class MonthArchiveViewTests(TestCase):
     fixtures = ['generic-views-test-data.json']
     urls = 'regressiontests.generic_views.urls'
@@ -234,6 +248,13 @@
         self.assertEqual(res.status_code, 200)
         self.assertEqual(res.context['previous_month'], datetime.date(2010,9,1))
 
+    def test_date_list_order(self):
+        """ date_list should be ascending in month view """
+        _make_books(35, base_date=datetime.date.today())
+        urlbit = datetime.date.today().strftime('%Y/%b').lower()
+        res = self.client.get('/dates/books/%s/' % urlbit)
+        self.assertEqual(list(res.context['date_list']), list(sorted(res.context['date_list'])))
+
 
 class WeekArchiveViewTests(TestCase):
     fixtures = ['generic-views-test-data.json']
