Module Expr Str ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr ClassDef bases body Assign NameStore TupleLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr ClassDef bases body Assign NameStore TupleLoad Str decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
6. Specifying ordering

Specify default ordering for a model using the ``ordering`` attribute, which
should be a list or tuple of field names. This tells Django how to order
``QuerySet`` results.

If a field name in ``ordering`` starts with a hyphen, that field will be
ordered in descending order. Otherwise, it'll be ordered in ascending order.
The special-case field name ``"?"`` specifies random order.

The ordering attribute is not required. If you leave it off, ordering will be
undefined -- not random, just undefined.
 django.db models Article N/A N/A models Model N/A N/A headline N/A N/A models CharField max_length 100 N/A pub_date N/A N/A models DateTimeField Meta N/A N/A N/A ordering N/A -pub_date headline N/A __unicode__ N/A N/A self N/A N/A N/A N/A self headline N/A N/A ArticlePKOrdering N/A N/A models Model N/A N/A headline N/A N/A models CharField max_length 100 N/A pub_date N/A N/A models DateTimeField Meta N/A N/A N/A ordering N/A -pk N/A __unicode__ N/A N/A self N/A N/A N/A N/A self headline N/A N/A