Answer the question
In order to leave comments, you need to log in
How to run a function in Django background?
There is a view
def view_index(request,*args,**kwargs):
run_very_long_function(args) // эту функцию надо выполнить в фоне, чтобы рендер произошел до ее выполнения
return render(request,"template.html")
Answer the question
In order to leave comments, you need to log in
You can use Django-RQ or Celery to create a task from a function and queue it up.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question