Which Django signal can run code automatically after a model instance is saved?
A
post_migrate
B
post_save
Correct answer
C
pre_delete
D
request_started
Correct answer
B. post_save
16 views
⚔️
Challenge a friend on Django
Same MCQs, timed, live leaderboard. Send the link on WhatsApp – no sign-up needed.
Create challenge
Explanation
A post_save receiver can, for example, create a Profile whenever a new User is created. Signals decouple apps but can make logic harder to trace if overused.
Reference
Asked in: Python Developer Interviews, NTS
Doubts & discussionNot sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ What happens if Model.objects.get() matches more than one row? Next MCQ › What is the advantage of Product.objects.update(stock=F('stock') - 1) over reading, changing and saving in Python?