blag
45b54a3402
Don't apply a default value if the value is already specified
2020-05-26 17:27:50 -07:00
Brandon Taylor
b1258afcea
Version bump to 2.1.9
...
Updated readme.
Added filter_kwargs as a replacement to extra_filters.
2018-10-10 14:02:11 -04:00
Brandon Taylor
fabd78e5be
Add Positional Arguments to Get Next/Previous
...
Added filter_args array argument to be passed to get_next/previous methods.
Added extra boolean fields to project model for testing.
2018-10-06 09:46:34 -04:00
Steven Wood
686ddae81c
Raise NotImplementedError instead of NotImplemented
2016-10-23 10:20:45 -04:00
Brandon Taylor
3f12b10926
Changed version check back to old-style for backwards compatibility.
2016-10-12 22:23:38 -04:00
Ruben Dura Tari
3c2935776e
Enables support for primary keys that are not AutoFields.
...
Specially useful when using UUIDs as primary keys.
2016-10-11 18:53:45 +01:00
endeav
ce091c34c6
Use pk instead of id
2016-02-19 15:27:50 +01:00
Brandon Taylor
698ca136d5
Refactored admin url patterns to be compatible with Django 1.8 or higher.
...
Refactored sample_project imports to be compatible with Django 1.9
Updated unit tests for get_next/previous.
Version bump to 2.0.8.
Fixed typo in docs.
2015-12-21 14:11:13 -05:00
Brandon Taylor
bee71e6d40
Refactored order_field_name out of Sortable class, instead deriving from Meta.ordering, since you have to set Meta.ordering to the order field to get the proper Sorting anyway.
2015-09-02 09:38:10 -04:00
Brandon Taylor
74a6cadf8d
Added legacy model definition back for seamless backwards compatibility.
...
Updated readme.
Added sample legacy model implementation.
2015-08-24 12:55:56 -04:00
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
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
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
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
25ef724e15
Fixed missing kwarg in calls to get_next/previous.
2014-09-06 14:52:09 -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
Christopher Grebs
e4a79e1d62
Fix python 2.6 compatibility
2014-05-26 14:52:46 +02:00
Brandon Taylor
80bdaafdc3
Refactored sorting_filters into a tuple and moved logic for retrieving sorting filters into the sort_view versus changelist_view.
...
Updated readme.
Updated sample project to leverage new sorting_filters on Person model and admin.
Removed custom change list template for Person admin.
2014-03-05 09:10:47 -05: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
Brandon Taylor
e51f7535ca
Added Person model with ordering_subset and initial data.
2014-02-05 09:36:03 -05:00
Brandon Taylor
2ca19f05c1
Updated string formatting on multiple foreign key exception.
2014-02-05 08:26:22 -05:00
Brandon Taylor
847b471872
Added properties to allow sortable change list and change form view to extend a custom template or extend the default admin change form and change list templates.
...
Fixed a problem with the detection of sortability of inline models at the template level that was preventing the drag-and-drop messaging in the template to be displayed.
Updated unit tests.
2013-05-03 08:35:17 -04: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
Brandon Taylor
661f417a7b
Merged pull request from kynazz to add support for unicode in sort view title.
...
Updated readme and version.
2013-04-23 08:05:40 -04:00
Brandon Taylor
810f8a0dd4
Fixed the inline stacked sortable template by passing in the original object rather than passing in the model type id of the original object.
...
Various PEP8 enhancements.
2012-11-02 09:04:32 -04:00
Brandon Taylor
13af5f8142
Fixed exception handling in 'is_sortable' classmethod
2012-09-30 21:41:17 -04:00
Brandon Taylor
37f91cce97
Added SortableForeignKey field to replace `sortable_by` model property.
...
Refactored how the sortable_by properties get populated by looping over the model fields until we get to the SortableForeignKey, then grabbing properties from the field and its related data.
2012-02-24 22:35:30 -06:00
unknown
1b9c5c0a64
Refactored sortable_by into a property instead of a classmethod.
...
Added backwards compatibility for pre 1.1.1 versions that still have sortable_by defined as a classmethod.
Need to address dynamic regroup template tag to see why categories are not being grouped properly in sample app.
2011-11-22 20:42:36 -06:00
Brandon Taylor
fba568399c
Eliminated setting of self.order to 1 if Max returns None, as order has a default value of 1 defined in the field.
2011-11-16 20:50:12 -06:00
Brandon Taylor
7a242dd41c
Refactored classmethods to use aggregation Max instead order_by.
2011-11-16 20:24:33 -06:00
Brandon Taylor
8365043e0e
Modified classmethod queries that determine if a Model is sortable to only retieve one record and not use count.
...
Fixed jQueryUI highlight method call in success handler of ajax function when dragging stops.
Fixed missing script resource for jquery.effects.core.js
2011-11-16 00:48:14 -06:00
Brandon Taylor
4e38d8fbe1
Adding files to repo.
2011-08-31 19:51:02 -05:00