In Django how can I get result from two tables in a single queryset without having relationship?

I have two models like this :

class A(models.Model):
    is_available = models.BooleanField()
    date = models.DateTimeField(auto_now_add=True)
    # Some Other Fields


class B(models.Model):
    is_available = models.BooleanField()
    date = models.DateTimeField(auto_now_add=True)
    # Some Other Fields

I want to get the records from both models in a single list of dictionaries based on available or not and filter by date in descending order. How can I do it?

Back to Top