from django.shortcuts import render_to_response
from django.shortcuts import redirect

from models import DownloadLink

def index(request):
    links = DownloadLink.objects.all()
    context = {'links': list(links)}
    return render_to_response('get/listing.tpl', context)

from django.shortcuts import render_to_response
from django.shortcuts import redirect

from models import DownloadLink

def index(request):
    links = DownloadLink.objects.order_by('-pk')
    context = {'links': list(links)}
    return render_to_response('get/listing.tpl', context)

Order download links by pk.
get: Order download links by pk.

  from django.shortcuts import render_to_response
  from django.shortcuts import redirect
  
  from models import DownloadLink
  
  def index(request):
-     links = DownloadLink.objects.all()
+     links = DownloadLink.objects.order_by('-pk')
      context = {'links': list(links)}
      return render_to_response('get/listing.tpl', context)
  
Order download links by pk.
## Code Before:
from django.shortcuts import render_to_response
from django.shortcuts import redirect

from models import DownloadLink

def index(request):
    links = DownloadLink.objects.all()
    context = {'links': list(links)}
    return render_to_response('get/listing.tpl', context)

## Instruction:
Order download links by pk.
## Code After:
from django.shortcuts import render_to_response
from django.shortcuts import redirect

from models import DownloadLink

def index(request):
    links = DownloadLink.objects.order_by('-pk')
    context = {'links': list(links)}
    return render_to_response('get/listing.tpl', context)
