I am writing a custom action for django admin. This action should only work for records having particular state.
For example "Approve Blog" custom action should approve user blog only when blog is not approved. And it must not appove rejected blogs.
One option is to filter non approved blogs and then approve them. But there are still chances that rejected blogs can be approved.
If user try to approve rejected blog, custom action should notify user about invalid operation in the django admin.
Any solution?