Skip to content

Instantly share code, notes, and snippets.

@jorilallo
Forked from sjl/urls.py
Created September 23, 2011 17:04
Show Gist options
  • Select an option

  • Save jorilallo/1237896 to your computer and use it in GitHub Desktop.

Select an option

Save jorilallo/1237896 to your computer and use it in GitHub Desktop.

Revisions

  1. @sjl sjl created this gist Sep 23, 2011.
    9 changes: 9 additions & 0 deletions urls.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # Put this in your urls.py file after the admin.autodiscover() line.
    # ---------------------------------------------------------------------------------

    # Monkeypatch the Celery admin to show a column for task run time in the list view.
    from djcelery.admin import TaskMonitor
    from djcelery.models import TaskState
    admin.site.unregister([TaskState])
    TaskMonitor.list_display += ('runtime',)
    admin.site.register(TaskState, TaskMonitor)