I have a question, that can Django do multi-thread works?
Here is what I want to do: click a button on a web page, then there are some functions in model.py starts
Here's an example of what you're describing.
User sends request
Django receives => spawns a thread to do something else.
main thread finishes && other thread finishes
... (later upon completion of both tasks)
response is sent to user as a package.
Better way:
User sends request
Django receives => lets Celery know "hey! do this!"
main thread finishes
response is sent to user
...(later)
user receives balance of transaction