examerioLogin
← Fullstack with Vue.jsQuestion 53 of 62

What does Django's extra() method do, and when would you use it?

📘 Explanation

extra() is a queryset method for injecting raw SQL fragments when the ORM alone can't express a query, though it's discouraged in favor of annotate() and database functions. The wrong answers invent unrelated purposes like enforcing Meta constraints, joining many-to-many models, or attaching post-processing Python hooks.

Related questions

← PreviousNo login needed