Commit graph

155 commits

Author SHA1 Message Date
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
Brandon Taylor
5e307d687b Version bump to 1.7.1.
Added Brazilian Portugese locale.
Fixed minor css scoping issue that caused stacked template items that were sortable to not display the 'move' cusor type.
Fixed comment line in manage.py for PEP8.
2014-08-21 22:14:36 -04:00
Brandon Taylor
1b2461444b Merged Python 2.6 comptaibility features.
Version bump.
Updated readme.
2014-05-29 10:24:54 -04: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
Brandon Taylor
6f25684e35 Version bump to 1.6.9.
Merged pull request from @kirov to fix multiple exception handling.
2014-05-28 08:15:39 -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
e7e74983a2 Version bump to 1.6.8.
Updated README.
2014-05-23 08:05:20 -04:00
Denis Popov
f42c4bb329 Add Russian localization 2014-05-20 10:12:20 +04:00
Brandon Taylor
1ebf86b4aa Updated README.
Version bump to 1.6.7
2014-04-08 07:52:26 -04:00
Eduardo Rivas
6a09efc8bd Localized to Spanish. 2014-04-08 01:08:29 -06: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
gladson
bc536509a4 update new version - translate pt_BR 2014-02-13 02:28:52 -04:00
Brandon Taylor
53df734e15 Fixed jQuery namespace on inline model JavaScript includes.
Version bump to 1.6.5.
Updated readme.
2014-02-12 16:22:04 -05:00
Brandon Taylor
e80a633edb Updated README.
Version bump to 1.6.4
2014-02-05 11:24:48 -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
Brandon Taylor
2ca19f05c1 Updated string formatting on multiple foreign key exception. 2014-02-05 08:26:22 -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
Brandon Taylor
76ff3ae7f9 Merged pull requests 66, 68 and 70.
Updated readme.
Version bump to 1.6.3
2013-12-03 07:42:32 -05:00
Brandon Taylor
c128d022c2 Merge pull request #70 from Leftfield/master
enable js correctly for generic inlines
2013-12-03 04:36:09 -08:00
João Miguel Neves
644583c08f enable js correctly for generic inlines 2013-12-03 11:32:31 +00:00
Moritz Pfeiffer
818a231a1a Reordering with unsaved inlines is faulty and counter intuitive.
In this commit I added a javascript alert that prompts the user to save their changes before reordering if unsaved inlines are detected.
Please review and let me know if this in compliance with your guidelines.
2013-12-03 10:45:17 +01:00
Moritz Pfeiffer
ab38988698 Added missing templates 2013-12-03 10:43:00 +01:00
Moritz Pfeiffer
ad73a806b3 Added German translation 2013-11-29 10:50:18 +01: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
Brandon Taylor
30f13aedff Added latest jQuery UI and added namespace fix so that jQueryUI can leverage jQuery included with Django admin.
Merged pull request 62 to replace depracated mimetype handling.
Bumped version to 1.6 to coincide with the release of Django 1.6.
Merged pull request 59 to improve query count speed by leveraging .count() instead of len().
Merged pull request 58 to ignore bad indexes.
2013-11-23 09:32:51 -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
Alexei
6195cd7390 Make fast query with "count(*)" instead selecting all data 2013-11-06 13:55:40 +03:00