Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wagtail-modeladmin-sortable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wagtail-modeladmin-sortable

A Wagtail app for drag-and-drop ordering for objects in the admin interface

  • 0.0.2
  • PyPI
  • Socket score

Maintainers
1

wagtail-modeladmin-sortable

Generic drag-and-drop ordering for objects in the Wagtail admin interface

Quick start

Install wagtail_modeladmin_sortable

$ pip install wagtail-modeladmin-sortable

Add wagtail_modeladmin_sortable to INSTALLED_APPS the settings of your Django project:

INSTALLED_APPS = [
  ...
  'wagtail_modeladmin_sortable',
]

Integrate your models

from django.db import models
from wagtail_modeladmin_sortable.models import AdminSortable


class Example(AdminSortable):
    title = models.CharField('Title', max_length=255, null=True, blank=True)

    class Meta(AdminSortable.Meta):
        verbose_name = "Example"
        verbose_name_plural = "Examples"
In wagtail_hooks.py, add a mixin class to augment the functionality for sorting (be sure to put the mixin class before ModelAdmin):
from wagtail.contrib.modeladmin.options import ModelAdmin
from wagtail_modeladmin_sortable.mixins import ModelAdminSortableMixin


class ExampleAdmin(ModelAdminSortableMixin, ModelAdmin):
    pass
License

Copyright © 2021 Stanislav Lazarov.

MIT licensed.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc