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