diff --git a/README.md b/README.md index 85a5db6..2daffcb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/iambrandontaylor/django-admin-sortable.svg?branch=master)](https://travis-ci.org/iambrandontaylor/django-admin-sortable) -Current version: 2.0.13 +Current version: 2.0.14 This project makes it easy to add drag-and-drop ordering to any model in Django admin. Inlines for a sortable model may also be made sortable, @@ -496,14 +496,11 @@ ordering on top of that just seemed a little much in my opinion. ### Status django-admin-sortable is currently used in production. - -### What's new in 2.0.13? -- Fixed an issue where the index_value for sortable stacked inlines might not have been found. - +### What's new in 2.0.14? +- Refactored exception handling when determining `order_field_name` ### Future - Better template support for foreign keys that are self referential. If someone would like to take on rendering recursive sortables, that would be super. - ### License django-admin-sortable is released under the Apache Public License v2. diff --git a/README.rst b/README.rst index b56f948..c05110c 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ Django Admin Sortable |Build Status| -Current version: 2.0.13 +Current version: 2.0.14 This project makes it easy to add drag-and-drop ordering to any model in Django admin. Inlines for a sortable model may also be made sortable, @@ -50,7 +50,7 @@ Download django-admin-sortable from `source `__ 1. Unzip the directory and cd into the uncompressed project directory -2. +2. - Optional: Enable your virtualenv @@ -611,11 +611,11 @@ Status django-admin-sortable is currently used in production. -What's new in 2.0.13? + +What's new in 2.0.14? ~~~~~~~~~~~~~~~~~~~~~ -- Fixed an issue where the index\_value for sortable stacked inlines - might not have been found. +- Refactored exception handling when determining ``order_field_name`` Future ~~~~~~ diff --git a/adminsortable/__init__.py b/adminsortable/__init__.py index 24c3011..00971ab 100644 --- a/adminsortable/__init__.py +++ b/adminsortable/__init__.py @@ -1,6 +1,6 @@ -VERSION = (2, 0, 13) -DEV_N = None - +VERSION = (2, 0, 14) +DEV_N = None + def get_version(): version = '{0}.{1}'.format(VERSION[0], VERSION[1]) diff --git a/adminsortable/admin.py b/adminsortable/admin.py index 44df674..303d846 100755 --- a/adminsortable/admin.py +++ b/adminsortable/admin.py @@ -194,7 +194,7 @@ class SortableAdmin(SortableAdminBase, ModelAdmin): except (AttributeError, IndexError): # for Django 1.5.x order_field_name = opts.ordering[0] - finally: + except (AttributeError, IndexError): order_field_name = 'order' objects = objects.order_by(sortable_by_expression, order_field_name)