Giter Site home page Giter Site logo

django-mass-edit's Introduction

Build Status Coverage Status

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

  • 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

  1. pip install django-mass-edit
  2. In settings.py, add 'massadmin' to installed apps
  3. In urls.py, add:
    from massadmin import urls as massadmin_urls
    from massadmin import mass_change_selected
    admin.site.add_action(mass_change_selected)

and add to urls:

    url(r'', include(massadmin_urls)),

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

Hacking and pull requests

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.

Changelog

3.0 - Use sessions instead of GET params for id passing. Started using git tags for nicer release tracking.

2.6 - Added Django 1.10 support

django-mass-edit's People

Contributors

bourivouh avatar bufke avatar cript0nauta avatar cuchac avatar d33tah avatar ecederstrand avatar elfgzp avatar empty avatar francescortiz avatar kennknowles avatar ludwiktrammer avatar mondaini avatar namanshenoy avatar pacotole avatar petrdlouhy avatar poligarcia avatar pombredanne avatar rblack avatar shanx avatar syrusakbary avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.