Commit Graph

13 Commits (15d8f201780b5c41b894c98ff08fb2950582777a)

Author SHA1 Message Date
Brandon Taylor b8a5238a09 Removed print debug statement.
Updated readme and generated readme in Restructred Text format for PyPi.
2015-12-23 17:22:53 -05:00
Brandon Taylor 5dee27e077 Added sorting icons.
Refactored determination of sortability of classes referenced as sortable foreign keys in admin in a more reliable way.
2015-12-23 16:39:45 -05:00
Denis Cornehl 4d8091bc5e fix slow get_is_sortable when using with inline admins
the first `if` call did execute the whole `select` query with (perhaps)
millions of records in them, even though the only result needed here
is one record.

The acually used queryset later will be filtered by the parent-model.
2015-11-11 16:03:19 +01:00
Brandon Taylor 43fef78876 Work in progress on refactoring the Sortable class into a non-obtrusive mixin. 2015-08-23 22:25:55 -04:00
tomd 7f0519afbe Fix sort changelist for objects with sortable fk
Loading the test app '/admin/app/project/sort/' changelist failed with
the following error:

UnboundLocalError: local variable 'objects' referenced before assignment

(utils.py, check_model_is_sortable)

See test sample_app test_adminsortable_change_list_view_loads_with_sortable_fk
2015-01-12 15:40:33 +00:00
Brandon Taylor a3c1f4457a Fixed merge conflicts. 2014-12-22 10:27:46 -05:00
Brandon Taylor 01403f1b8c Merged pull request 97 2014-12-22 10:25:35 -05:00
Brandon Taylor 7cd8f7cad3 Added Python 3 compatibility to sample project.
Removed utils file and moved map_path function to settings.py.
Refactored tests for Python 2 and 3 compatibility.
Added inheritance check to get proper determination if a SortableForeignKey field is defined but the specified model does not inherit from Sortable.
2014-11-19 10:58:55 -05:00
Brandon Taylor 612c4f8031 Added method to check for self-referential sortable foreign keys. 2014-11-03 10:43:41 -05:00
Brandon Taylor 3acd88e8c4 Added utility function to check if a model defined as a sortable foreign key inherits from Sortable and if there are more than one objects for that model. 2014-10-24 20:28:36 -04:00
Brandon Taylor 1b4730fef9 Added Person model with sorting_filters set to only order people who are board members.
Added custom template override to specify which people are sortable in change list.
Added initial data fixture for people.
2014-02-05 11:08:02 -05:00
Alexei 6195cd7390 Make fast query with "count(*)" instead selecting all data 2013-11-06 13:55:40 +03:00
Brandon Taylor 014f6d1660 Added support for queryset() overrides on admin classes and inline admin classes.
Updated version to 1.4.5.
Updated README with explanation of requirements for overriding queryset() on inline models.
Added extra models to sample project to demonstrate sortable models with custom querysets.
Improved JavaScript of sortables to be more efficient with better comparison checking.
Fixed highlighting of stacked inlines on sort finish.
2013-04-27 22:58:02 -04:00