> To work around the "problem" (it's an evaluation-timing thing, so
> Python/Django is doing the "right" thing...just not what you
> expected), you need to simply pass Page.objects to your dict as,
> say "objects". Then, in your view template, you need to
> reference "objects.latest.slug" which w
I'm trying to create a view that shows the 1 most recent entry in a
particular table. I've got it working like this in my urls.py:
latest_info_dict = {
'queryset': Page.objects.all(),
'slug': Page.objects.latest().slug,
}
urlpatterns = patterns('',
(r'^$', 'django.views.generic.list_
2 matches
Mail list logo