urlpatterns += patterns('yourapp.views', ('^task$', 'task'))

def task(request):
    if request.user.is_authenticated():
        update_definitions_task.delay()
return redirect('/admin')
Add a custom button to a Django application's admin page