Commit Graph

186 Commits (6c5a9058fecad8ad5ef240b3fd8b028accfab6f3)

Author SHA1 Message Date
Brandon Taylor 6c5a9058fe Minor PEP8, text and formatting tweaks. 2015-08-24 08:18:22 -04: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
Brandon Taylor 100177f11d Version bump to 1.8.4 2015-07-05 23:04:03 -04:00
Brandon Taylor da0da5e690 Fixes: Bug in get_previous() method #108
Added ordering to _filter_objects internal method to correctly select previous object.
2015-07-05 22:37:20 -04:00
Brandon Taylor ef05c0f7cb Version bump to 1.8.3.
Updated readme with 1.8.3 information.
Updated travis configuration to remove deprecated config settings.
2015-04-08 22:16:20 -04:00
Brandon Taylor ad09081ab4 Added exception handling for get_queryset attribute. 2015-04-08 22:06:14 -04:00
Brandon Taylor a5c1c53400 Added Polish translations.
Version bump to 1.8.2
2015-04-01 12:01:16 -04:00
Tomasz Gabrysiak a34adef6ba add polish translation 2015-03-30 21:17:49 +02:00
Brandon Taylor 4f16fd266c Version bump to 1.8.1.
Updated readme.
2015-03-24 09:19:58 -04:00
Brandon Taylor ca6d4ee8ed Removed debugging information. 2015-03-24 09:13:33 -04:00
flyingeek 4a6a97a663 fix sortable function not found
Adminsortable uses django.jQuery
2015-03-24 13:40:07 +01:00
ILYA cbc27663a3 Refactored import from generic module to get rid of DeprecationWarning 2015-02-25 19:38:29 +03:00
Brandon Taylor 0af13803fb Version bump to 1.8.0.
Updated readme.
2015-01-12 22:56:38 -05: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 a64d86a219 Merged PR 99.
Bumped version to 1.7.9.1
2014-12-27 12:45:49 -05:00
mark@ignacio.io da39cf7497 re-enabled href in shared/object_rep.html 2014-12-27 12:18:10 -05:00
mark@ignacio.io d841ebfbfe removed print statements 2014-12-27 12:12:47 -05:00
Brandon Taylor 740d3fff15 Version bump to 1.7.9.
Updated README.
2014-12-22 10:37:44 -05: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
matt-leach e0b38fb705 Using __class__ to get model class as model is not an attribute of class Meta in Django 1.5.x 2014-12-22 14:57:17 +00:00
matt-leach c7f2d63ec9 calling the correct queryset/get_queryset for VERSION 2014-12-22 14:44:02 +00:00
matt-leach cf1a2103dd Updating VERSION comparison to be compatible with all 1.5.x 2014-12-22 14:36:15 +00:00
Brandon Taylor dfc654121c Version to 1.7.8.
Updated readme.
2014-11-19 11:10:28 -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
Venelin Stoykov cfcf6b1a46 Make inlines to work corectly with non sortable inlines 2014-11-18 17:04:20 +02:00
Brandon Taylor a7179fece4 Version bump to 1.7.7.
Updated readme with notes on self-referential SortableForeignKeys.
2014-11-03 10:50:02 -05:00
Brandon Taylor e521d5c8ad Added extra check for object when sorting self-referential models. 2014-11-03 10:44:11 -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 d332563e27 Fixed call to queryset object for Django >= 1.7 2014-11-03 10:43:13 -05:00
Brandon Taylor 13945375f1 Version bump to 1.7.6.
Updated readme.
2014-10-24 20:43:12 -04:00
Brandon Taylor 5eaf0987b9 Added a space after the legacy sortable_by parameter to separate it. 2014-10-24 20:31:02 -04:00
Brandon Taylor 116a933d92 Updated comments to be clearer.
Minor formatting changes.
Cahnged check for sortable_by_class_is_sortable to use new check_model_is_sortable, rather than only relying on the number of objects.
2014-10-24 20:30:14 -04: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 4da0deb503 Updated readme.
Version bump to 1.7.5
2014-10-06 09:07:30 -04:00
Brandon Taylor ca2a414ded Added version specific overrides for get_queryset and get_query_set.
Added new get_permissions_codename check for permissions in upcoming Django 1.8.
Refactored all version checks. All checks are done in tuple format instead of checking for a django major and minor version number.
Removed unused RequestFactory in tests.
2014-10-06 08:56:41 -04:00
Brandon Taylor b705c924f0 Fixed comparison operator according to PEP8. 2014-10-04 11:55:12 -04:00
Brandon Taylor 03cfdf2f3d Version bump to 1.7.4.
Updated readme with additional NonSortableParentAdmin related docs.
2014-09-21 19:20:55 -04:00
Brandon Taylor f33f5e90ed Refactored do_sorting_view to get start_index default value from len(indexes) rather than duplicate the line and set to 0.
Added NonSortableParentAdmin class to enable sorting URLs and JavaScript on models that do not inherit from Sortable.
Removed unused 'ordering' property on SortableAdmin.
Changed assignment of sorting_filters to use getattr, enabling NonSortableParentAdmin to inherit from SortableAdminBase.
Moved template properties to SortableAdminBase.
2014-09-21 15:12:30 -04:00
Brandon Taylor b880018f71 Added css target class to proerly display the 'move' cursor for sortable stacked inlines. 2014-09-21 14:31:46 -04:00
Jaap Roes 0e993c524c Removed a stray "TEST 2" 2014-09-19 13:30:46 +02:00
Jaap Roes 483e834537 Fix formatting string for Python 2.6 2014-09-12 11:04:44 +02:00
Brandon Taylor 4c1ffdebea Version bump to 1.7.3.
Updated readme to document get_next/previous
2014-09-06 15:32:54 -04:00
Brandon Taylor 25ef724e15 Fixed missing kwarg in calls to get_next/previous. 2014-09-06 14:52:09 -04:00
Brandon Taylor e08077a0b2 PEP8 cleanup. 2014-09-06 14:51:26 -04:00
Brandon Taylor 27686d6f79 Removed unused variable. 2014-09-06 12:38:00 -04:00
Brandon Taylor 1a96bb0d21 Added option to disable sortable foreign key filtering. 2014-09-05 23:07:16 -04:00
Brandon Taylor fee0ba81b0 Moved logic to set sortable_foreign_key property to Sortable instead of SortableAdmin.
Added instance methods to get next or previous instance, optionally filtered by a sortable foreign key field.
2014-09-05 23:02:29 -04:00
Brandon Taylor 361305d6a5 Updated Readme.
Version bump to 1.7.2.
Merged pull request for commit 4e38d91.
Removed version specifications from requirements.txt in sample project.
2014-09-05 16:37:45 -04:00
Scott Clark 41fa948bb2 ModelAdmin.change_view takes a form_url kwarg
This allows change_view super calls to AdminSortable and
ModelAdmin to play nice with each other.
2014-09-04 14:07:55 -06:00