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
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
Brandon Taylor
e19edc7d9e
Merge pull request #81 from EnTeQuAk/feature/python-2.6
...
Fix python 2.6 compatibility
2014-05-29 10:22:15 -04:00
Evgeniy Kirov
357268e9b0
Fix "except"
2014-05-28 16:11:04 +04:00
Christopher Grebs
e4a79e1d62
Fix python 2.6 compatibility
2014-05-26 14:52:46 +02:00
Brandon Taylor
13549da827
Removed un-needed format specificity.
2014-03-05 09:24:32 -05: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
95e21eea5e
Merge branch 'order-subset'
2014-02-05 11:13:58 -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
A.Sichkar
cadf41dd1d
Python 2.6.x compatibility fix (unindexed str.format in admin.py
2014-01-13 15:35:23 +02:00
João Miguel Neves
644583c08f
enable js correctly for generic inlines
2013-12-03 11:32:31 +00:00
Brandon Taylor
469e7d5d4d
Added new stacked and tabular change form templates for inlines from Django 1.6.
...
Added backwards compatibility changes for the setting of the edit inline template to use.
2013-11-25 22:03:20 -05:00
Brandon Taylor
41be929a7d
Fixed path to jQueryUI in change form.
...
Version bump to 1.6.1
2013-11-25 21:32:34 -05:00
Andreas Hug
10937eb6d8
Replace deprecated mimetype with content_type
...
Passing `mimetype` to an HttpResponse object is deprecated
since Django 1.5 and will throw an error in Django 1.7.
`content_type` is supported since Django 1.0.
2013-11-23 12:18:09 +01:00
A.Sichkar
b79e806961
Ignore requests with wrong data, e.g. {u'indexes': [u'34,32,35,1,,33,7,5,3,29,27,4,11,14,13,31']}
2013-10-31 14:54:28 +02:00
Mathijs de Bruin
1bf1f96703
Remove CSRF exemption where it did not belong.
2013-09-04 22:15:28 +02:00
Brandon Taylor
b3fd59da02
Added an override for the admin add_view to prevent the change form template extends variable from not being populated.
2013-06-20 15:47:41 -04:00
Andrii Kostenko
bb6c625f62
Python 3 support
2013-05-11 15:18:01 +03:00
Brandon Taylor
8bcf2bfb2e
Fixed check for sortable inline models which prevented JavaScript from loading correctly.
2013-05-07 09:22:40 -04: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
32c6f7c034
Fixed unicode support for title context variable in sort view.
...
Updated version to 1.4.5.1
Updated README.
2013-04-30 08:36:46 -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
373197553e
Reverted changes that added get_sort_url template tag, as this caused an exception error with inlines.
2013-04-26 13:30:42 -04:00
Smirnov Evgenii
c6e5f9e68e
fix unicode verbose_name view in administration
2013-04-23 10:55:25 +04:00
Brandon Taylor
ece9876a47
Minor PEP8 improvements.
...
Updated version to 1.4.1.
Updated README.
2013-03-15 07:31:14 -04:00
intelliadmin
279477da7b
added generic inlines support
2013-03-15 10:10:01 +01:00
Brandon Taylor
a54e81434f
Minor modifications for Django 1.5.x and 1.4.x backward-compatibility.
...
Added new sample project.
Improved documentation.
Refactored CSS selector for inlines that are sortable.
2013-03-10 20:53:05 -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
Alexander A. Sosnovskiy
1c2964c566
Unable to sort in more than one application in project - fixed.
2012-09-24 15:12:07 +03:00
Alexander A. Sosnovskiy
22cd63a4ba
It was impossible to override sortable_javascript_includes_template. Fixed.
2012-09-24 12:16:20 +03:00
Alexander A. Sosnovskiy
dfbe590767
Templates can be overriden now.
2012-09-23 21:37:58 +03:00
Brandon Taylor
484f00d263
Updated version to 1.3.2.
...
Updated status to stable/production.
Added AttributeError exception handling for models that specify a SortableForeignKey that does not inherit from Sortable.
Added template support for nested objects that are sortable by a foreign key, where the foreign key is not sortable.
2012-06-07 09:38:36 -04:00
Dominique Lederer
fef90e6d0c
make adminsortable work with descending ordering
2012-03-15 09:58:52 +01:00
Dominique Lederer
cbbcf901fc
remove root_path, which produces an error on django 1.4 and also is not used in the template
2012-03-15 09:39:55 +01: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
Brandon Taylor
63a80f5953
Incremented version to 1.2.
...
Refactored ORM calls to properly order objects by the sortable_by property to ensure objects are grouped correctly in the sortable change list template after being passed through dynamic_regroup.
Fixed missing import for jquery.effects.core, again.
Refactored sortable_by classmethod into a property.
2011-11-22 22:19:39 -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
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
1117941f91
Added KeyError handling on do_sorting_view
2011-10-04 12:01:06 -05:00
Brandon Taylor
e1311fc6f5
Added support for non-numeric primary keys
2011-09-17 16:48:14 -05:00
Brandon Taylor
2f2aeff0ec
Fixed if statements so they won't bomb if inline class doesn't subclass sortable.
2011-09-03 22:46:05 -05:00
Brandon Taylor
5d10de5ed4
Added SortableInlineBase class to do subclass checking.
2011-09-03 22:03:40 -05:00
Brandon Taylor
971de8423c
Added support for stacked inline models.
...
Added highlighting to sorted inline.
Added migrations to add Note class to database.
Added SortableInlineBase for checking type of model specified in inline model subclasses Sortable.
2011-09-03 22:02:48 -05:00
Brandon Taylor
4e38d8fbe1
Adding files to repo.
2011-08-31 19:51:02 -05:00