Added more information to index
This commit is contained in:
Vendored
+38
-2
@@ -6,16 +6,52 @@
|
||||
Welcome to Django Admin Sortable's documentation!
|
||||
=================================================
|
||||
|
||||
Django Admin Sortable is a super-easy way to add drag-and-drop ordering to almost any model you manage through Django admin. Inlines for a sortable model may also be made sortable, enabling individual items or groups of items to be sortable.
|
||||
|
||||
Supported Django Versions
|
||||
-------------------------
|
||||
|
||||
Django 1.4.x
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Use django-admin-sortable 1.4.9 or below.
|
||||
|
||||
.. note::
|
||||
|
||||
v1.5.2 introduced backwards incompatible changes for Django 1.4.x
|
||||
|
||||
Django >= 1.5.x
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Use the latest version of django-admin-sortable.
|
||||
|
||||
.. warning::
|
||||
|
||||
v1.6.6 introduced a backwards-incompatible change for ``sorting_filters``. Please update your ``sorting_filters`` attribute(s) to the new, tuple-based format.
|
||||
|
||||
What's New in |version|?
|
||||
------------------------
|
||||
|
||||
- Python 2.6 backwards compatibility. Thanks `@EnTeQuAk <https://github.com/EnTeQuAk>`_
|
||||
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
quickstart
|
||||
|
||||
configuration
|
||||
usage
|
||||
django-cms
|
||||
known-issues
|
||||
rationale
|
||||
status
|
||||
future
|
||||
license
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
------------------
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
|
||||
+27
@@ -8,3 +8,30 @@ To get started using ``django-admin-sortable`` simply install it using ``pip``::
|
||||
Add ``adminsortable`` to your project's ``INSTALLED_APPS`` setting.
|
||||
|
||||
Ensure ``django.core.context_processors.static`` is in your ``TEMPLATE_CONTEXT_PROCESSORS`` setting.
|
||||
|
||||
Define your model, inheriting from ``adminsortable.Sortable``::
|
||||
|
||||
# models.py
|
||||
from adminsortable.models import Sortable
|
||||
|
||||
class MySortableClass(Sortable):
|
||||
class Meta(Sortable.Meta):
|
||||
pass
|
||||
|
||||
title = models.CharField(max_length=50)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.title
|
||||
|
||||
Wire up your sortable model to Django admin::
|
||||
|
||||
# admin.py
|
||||
from adminsortable.admin import SortableAdmin
|
||||
from .models import MySortableClass
|
||||
|
||||
class MySortableAdminClass(SortableAdmin):
|
||||
"""Any admin options you need go here"""
|
||||
|
||||
admin.site.register(MySortableClass, MySortableAdminClass)
|
||||
|
||||
Your model's ChangeList view should now have an extra tool link when there are 2 or more objects present that will take you to a view where you can drag-and-drop the objects into your desired order.
|
||||
|
||||
Reference in New Issue
Block a user