nickspring / django-mass-edit

Make bulk changes in the Django admin interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

From Stanislaw Adaszewski's blog. I've fixed bugs and made changes to make it a production friendly drop-in Django app for bulk changes in Django's admin interface.

Check off what you want to edit in list view then choose mass edit from the actions menu. Image was taken using Grappelli

Alt text

Features

  • Drop in app, works with all models in admin
  • Doesn't allow users to edit unique and read only fields
  • Attempts to detect and show users errors
  • Database transactions ensure either all or no objects are changed

Not implemented

  • Custom forms
  • No support for inlines. Original had this. I commented it out because I felt it was very buggy.
  • Validation errors do not show up by the field they should

Installation

pip install django-mass-edit

In settings.py add massadmin to installed apps.

Add (r'^admin/', include("massadmin.urls")), to urls.py

Optional

You may exclude some fields like this:

class PollAdmin(admin.ModelAdmin):
    massadmin_exclude = ['user', ]

You can also add or remove the "action" to models if you don't want it global. See Django Docs on the subject

About

Make bulk changes in the Django admin interface


Languages

Language:Python 100.0%