Django Union Query

前端 未结 2 414
深忆病人
深忆病人 2021-01-24 22:54

I need to develop a UNION query in Django with 3 models namely WebQuery,WebReply and BusinessOwners and the output should be of the form below.

{
    \"(#convers         


        
2条回答
  •  逝去的感伤
    2021-01-24 23:10

    How can I find the union of two Django querysets? provides an example of a union using the '|' operator. I'm not sure how different your models are. If there's common fields you could place those in a separate model and use model inheritance

提交回复
热议问题