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
- 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
- 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
pip install django-mass-edit
- In settings.py, add massadmin to installed apps
- In settings.py, uncomment/add django.template.loaders.eggs.Loader in TEMPLATE_LOADERS section
- Add
(r'^admin/', include("massadmin.urls")),
to urls.py
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
This project could use some love. It has few unit test and old code that could be refactored. When you make a pull request - please include a unit test. If you want to take on improving the project let me know by opening an issue.
New maintainers welcome. I (bufke) will only be providing minimal support to keep the project running on modern versions of Django. Open an issue if you are interested.
2.6 - Added Django 1.10 support