From: Tollef Fog Heen Date: Wed, 1 Aug 2012 18:58:26 +0000 (+0200) Subject: Order invoice lists X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a70dc9b15ff180e21f1143e577b8866c2bb4c85;p=peojumk Order invoice lists --- diff --git a/invoice/views.py b/invoice/views.py index 3dd098f..6969d09 100644 --- a/invoice/views.py +++ b/invoice/views.py @@ -17,8 +17,8 @@ from invoice.forms import ClientForm, InvoiceForm, InvoiceUpdateForm @login_required def index(request): clients = Client.objects.all() - unpaid_invoices = Invoice.objects.filter(status__in = ['N', 'S']) - paid_invoices = Invoice.objects.filter(status = 'P') + unpaid_invoices = Invoice.objects.filter(status__in = ['N', 'S']).order_by('id') + paid_invoices = Invoice.objects.filter(status = 'P').order_by('id') return render_to_response('invoice/index.html', locals()) # ------------------- CLIENT ---------------