﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17192	next_day from views.generic.dates.DayArchiveView returns None instead of today	justin@…	Aymeric Augustin	"The next_day from views.generic.dates.!DayArchiveView returns None when next_day would be today.

{{{

# in models.py
from django.db import models

class Post(models.Model):  
  pub_date = models.DateTimeField(auto_now_add=True)

# views.py
from django.views import generic
from bugdemo.models import *

class PostDayView(generic.DayArchiveView):
  queryset = Post.objects.all()
  date_field = 'pub_date'
  allow_empty = True
  allow_future = False

# urls.py
from django.conf.urls.defaults import patterns, include, url
from bugdemo.views import PostDayView

urlpatterns = patterns('',
  (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{1,2})/$', PostDayView.as_view()),
)

# post_archive_day.html
Previous day: {{ previous_day }}
Next day: {{ next_day }}

# page request
$ curl http://localhost:8000/2011/nov/9/    # that's yesterday, as of the time of writing
Previous day: Nov. 8, 2011
Next day: None
}}}

Unless I misunderstand what the behavior is supposed to be, I expected the `next_day` to be `datetime.date(2011, 11, 9)`, not None.
"	Bug	closed	Generic views	1.3	Normal	fixed			Accepted	0	0	0	0	0	0
