def post_detail(request, slug, year, month, day, **kwargs):
 posts = None
 if request.user.is_superuser:
  posts = Post.objects.all()
 else:
  posts = Post.objects.published()
 return date_based.object_detail(request, year=year, month=month, day=day, date_field='publish', slug=slug, queryset=posts, **kwargs)

def post_detail ( request , slug , year , month , day , ** kwargs ) : posts = None if request . user . is_superuser : posts = Post . objects . all ( ) else : posts = Post . objects . published ( ) return date_based . object_detail ( request , year = year , month = month , day = day , date_field = 'publish' , slug = slug , queryset = posts , ** kwargs )
displays post detail .