parent
c2ca9db931
commit
32726cdcae
17
README.md
17
README.md
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[](https://travis-ci.org/iambrandontaylor/django-admin-sortable)
|
[](https://travis-ci.org/iambrandontaylor/django-admin-sortable)
|
||||||
|
|
||||||
Current version: 2.0.19
|
Current version: 2.0.20
|
||||||
|
|
||||||
This project makes it easy to add drag-and-drop ordering to any model in
|
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,
|
Django admin. Inlines for a sortable model may also be made sortable,
|
||||||
|
|
@ -17,11 +17,9 @@ Sorting inlines:
|
||||||

|

|
||||||
|
|
||||||
## Supported Django Versions
|
## Supported Django Versions
|
||||||
If you're using Django 1.4.x, use django-admin-sortable 1.4.9 or below.
|
For Django 1.5.x to 1.9.x, use version 2.0.18.
|
||||||
|
|
||||||
For Django 1.5.x to 1.9.x, use version 2.0.18 or below.
|
For Django 1.10.x, use 2.0.19 or higher.
|
||||||
|
|
||||||
For Django 1.10.x, use the latest version.
|
|
||||||
|
|
||||||
### Other notes of interest regarding versions
|
### Other notes of interest regarding versions
|
||||||
django-admin-sortable 1.5.2 introduced backward-incompatible changes for Django 1.4.x
|
django-admin-sortable 1.5.2 introduced backward-incompatible changes for Django 1.4.x
|
||||||
|
|
@ -108,6 +106,8 @@ class MySortableClass(SortableMixin):
|
||||||
return self.title
|
return self.title
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Support for models that don't use an `AutoField` for their primary key are also supported in version 2.0.20 or higher.
|
||||||
|
|
||||||
#### Common Use Case
|
#### Common Use Case
|
||||||
A common use case is to have child objects that are sortable relative to a parent. If your parent object is also sortable, here's how you would set up your models and admin options:
|
A common use case is to have child objects that are sortable relative to a parent. If your parent object is also sortable, here's how you would set up your models and admin options:
|
||||||
|
|
||||||
|
|
@ -245,7 +245,7 @@ You may also pass in additional ORM "extra_filters" as a dictionary, should you
|
||||||
|
|
||||||
### Adding Sorting to an existing model
|
### Adding Sorting to an existing model
|
||||||
|
|
||||||
#### Django 1.6.x or below
|
#### Django 1.5.x to 1.6.x
|
||||||
If you're adding Sorting to an existing model, it is recommended that you use [django-south](http://south.areacode.com/) to create a schema migration to add the "order" field to your model. You will also need to create a data migration in order to add the appropriate values for the "order" column.
|
If you're adding Sorting to an existing model, it is recommended that you use [django-south](http://south.areacode.com/) to create a schema migration to add the "order" field to your model. You will also need to create a data migration in order to add the appropriate values for the "order" column.
|
||||||
|
|
||||||
Example assuming a model named "Category":
|
Example assuming a model named "Category":
|
||||||
|
|
@ -500,9 +500,8 @@ ordering on top of that just seemed a little much in my opinion.
|
||||||
### Status
|
### Status
|
||||||
django-admin-sortable is currently used in production.
|
django-admin-sortable is currently used in production.
|
||||||
|
|
||||||
### What's new in 2.0.19?
|
### What's new in 2.0.20?
|
||||||
- Dropped support for Django 1.5.x
|
- Support for models that use another type of field besides `AutoField` for their primary key. Thanks [@rubendura](https://github.com/rubendura).
|
||||||
- Updated change_form, change_list and edit inline templates for Django 1.10 compatibility.
|
|
||||||
|
|
||||||
### Future
|
### 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.
|
- Better template support for foreign keys that are self referential. If someone would like to take on rendering recursive sortables, that would be super.
|
||||||
|
|
|
||||||
21
README.rst
21
README.rst
|
|
@ -3,7 +3,7 @@ Django Admin Sortable
|
||||||
|
|
||||||
|Build Status|
|
|Build Status|
|
||||||
|
|
||||||
Current version: 2.0.19
|
Current version: 2.0.20
|
||||||
|
|
||||||
This project makes it easy to add drag-and-drop ordering to any model in
|
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,
|
Django admin. Inlines for a sortable model may also be made sortable,
|
||||||
|
|
@ -26,11 +26,9 @@ Sorting inlines:
|
||||||
Supported Django Versions
|
Supported Django Versions
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
If you're using Django 1.4.x, use django-admin-sortable 1.4.9 or below.
|
For Django 1.5.x to 1.9.x, use version 2.0.18.
|
||||||
|
|
||||||
For Django 1.5.x to 1.9.x, use version 2.0.18 or below.
|
For Django 1.10.x, use 2.0.19 or higher.
|
||||||
|
|
||||||
For Django 1.10.x, use the latest version.
|
|
||||||
|
|
||||||
Other notes of interest regarding versions
|
Other notes of interest regarding versions
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
@ -139,6 +137,9 @@ Sample Model:
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
|
Support for models that don't use an ``AutoField`` for their primary key
|
||||||
|
are also supported in version 2.0.20 or higher.
|
||||||
|
|
||||||
Common Use Case
|
Common Use Case
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
@ -302,7 +303,7 @@ should you need to:
|
||||||
Adding Sorting to an existing model
|
Adding Sorting to an existing model
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Django 1.6.x or below
|
Django 1.5.x to 1.6.x
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If you're adding Sorting to an existing model, it is recommended that
|
If you're adding Sorting to an existing model, it is recommended that
|
||||||
|
|
@ -616,12 +617,12 @@ Status
|
||||||
|
|
||||||
django-admin-sortable is currently used in production.
|
django-admin-sortable is currently used in production.
|
||||||
|
|
||||||
What's new in 2.0.19?
|
What's new in 2.0.20?
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
- Dropped support for Django 1.5.x
|
- Support for models that use another type of field besides
|
||||||
- Updated change\_form, change\_list and edit inline templates for
|
``AutoField`` for their primary key. Thanks
|
||||||
Django 1.10 compatibility.
|
[@rubendura](https://github.com/rubendura).
|
||||||
|
|
||||||
Future
|
Future
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
VERSION = (2, 0, 19)
|
VERSION = (2, 0, 20)
|
||||||
DEV_N = None
|
DEV_N = None
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue