Thursday, March 29, 2012

Re: Best approach to execute tasks inside django admin views

On Thu, Mar 29, 2012 at 6:28 PM, Marc Aymerich <> wrote:
> Hi guys,
> I have an application that execute some tasks after an object is
> modifyed through django admin interface. In order to do that I'm
> subscribed to django.contrib.admin.models.EntryLog post_save signal
> and for each signal I execute a celery task.
> As you migh know django admin views are running under
> commit_on_success transaction so executing tasks within can lead to
> some issues, good explained on the celery documentation:
> So my question is, how do I should deal with this transactions?
> it is possible to manually commit a commit_on_success transaction
> before calling the task?
> if not, what would you do? monkeypatch django admin views to use
> commit_manually?
> subclass all your project modelAdmin classes? (I'm using a lot of
> reusable applications)

Just saw this ticket


You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment