我有一个Quest对象,"belongs_to“或通过外键引用许多其他对象,包括User和Content:quest.a_different_name_id #thisis a foreign key to a Content object f.text_field :a_different_name_attribute #an
如何返回特定模型的所有对象实例,这些对象实例被不同模型的任何对象实例作为外键寻址?假设有一个模型项和一个与项有外键关系的模型ItemRequested。如何打印ItemRequested表/模型中作为外键提到的所有项?基本上,这就是我想在Django中执行的SQL查询: select * from backend_item where id in (select id f