Bird
0
0

Which signal would you use to perform an action immediately after a model instance is saved?

easy📝 Conceptual Q2 of 15
Django - Signals
Which signal would you use to perform an action immediately after a model instance is saved?
Apre_save
Bpost_save
Cpre_delete
Dpost_delete
Step-by-Step Solution
Solution:
  1. Step 1: Identify signal timing

    The post_save signal runs immediately after a model instance is saved.
  2. Step 2: Eliminate other options

    pre_save runs before saving, and delete signals run on deletion, not saving.
  3. Final Answer:

    post_save -> Option B
  4. Quick Check:

    Action after save = post_save [OK]
Quick Trick: Post_save runs after saving data [OK]
Common Mistakes:
MISTAKES
  • Choosing pre_save for after-save actions
  • Confusing delete signals with save signals
  • Assuming post_save runs before saving

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes