Jul 252009
class Meta:
order = ['name']
——-
class Meta:
ordering=['-pub_date']
——-
class Meta:
ordering=['+pub_date']
——-
Django will retrieve list of objects in order, by name, descending or ascending pub_date etc.
Posted by weboom at 2:48 pm
Tagged with: Class meta, ordering
