Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

How should a long-running task such as sending email be handled in a Django view?

  1. A Executed synchronously in the view
  2. B Dispatched to a task queue such as Celery
  3. C Run in the template
  4. D Deferred to the next request
Answer

Dispatched to a task queue such as Celery

Blocking the request holds a worker process and eventually times out for the user. Queues also provide retries and failure isolation.

All Django MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as