added reverse order for admin_order_field
|Reported by:||fetzig||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||yes||Patch needs improvement:||yes|
after adding this you can setup something like this:
def age_in_years(self): return # age calculated via DateField self.date_of_birth age_in_years.admin_order_field = '-date_of_birth'
the '-' at the beginning of '-date_of_birth' indicates the reverse order in the changelist.
already made a pull request here:
- patch for docs
won't be able to make the docs update and tests within the next week. so everybody is very welcome if you like to do that :)
Change History (6)
comment:1 Changed 3 years ago by
|Patch needs improvement:||unset|
|Type:||Uncategorized → New feature|