Custom ordering in Django
@Jarret's answer (do the sort in Python) works great for simple cases.  As soon as you have a large table and want to, say, pull only the first page of results sorted in a certain way, this approach breaks (you have to pull every single row from the database before you can do the sort).  At that point I would look into adding a denormalized "sort" field which you populate from the "name" field at save-time, that you can sort on at the DB-level in the usual way.
How do you define a specific ordering in Django QuerySets?
Specifically, if I have a QuerySet like so: ['a10', 'a1', 'a2'].
Regular order (using Whatever.objects.order_by('someField')) will give me ['a1', 'a10', 'a2'], while I am looking for: ['a1', 'a2', 'a10'].
What is the proper way to define my own ordering technique?