def detail(request, file_id): f = get_object_or_404(File, pk=file_id) return render_to_response('detail.html', {'file': f})
def index(request): filelist = File.objects.all().order_by('-updated')[:5] return render_to_response('index.html', {'filelist': filelist})