Opened 6 years ago

Closed 6 years ago

#19469 closed Cleanup/optimization (fixed)

Remove opts.get_ordered_objs()

Reported by: Anssi Kääriäinen Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The django.db.models.options.Options.get_ordered_objs() doesn't do anything. It seems it was meant to be used by the admin, and the admin has some references to it, but nothing is actually done by it.

There are also some related javascript files: admin/ordering.js and getElementsBySelector.js which are not used by anything in Django - they would have been used had get_ordered_objs() done actually something.

The patch at removes these and some references in templates, too. The question is if the changes in templates or the javascript files are likely to be used in existing projects - if so there is little reason to remove the code as keeping them around isn't a big maintenance burden.

Change History (2)

comment:1 Changed 6 years ago by Anssi Kääriäinen

Triage Stage: UnreviewedReady for checkin

I think I will just commit what I have. If somebody needs any of the removed code it will be fairly simple to resurrect. And, I don't think the code will be missed...

comment:2 Changed 6 years ago by Anssi Kääriäinen <akaariai@…>

Resolution: fixed
Status: newclosed

In d7b49f5b0dcecfcc9b5a77632ecbba88e7637490:

Fixed #19469 -- Removed opts.get_ordered_objects() and related code

The code was dead-code since 2006.

Note: See TracTickets for help on using tickets.
Back to Top