Suppose I have 2 models.
The 2nd model has a one-to-one relationship with the first model.
I'd like to select information from the first model, but ORDER BY the 2nd model. How can I do that?
class Content(models.Model):
link = models.TextField(blank=True)
title = models.TextField(blank=True)
is_channel = models.BooleanField(default=0, db_index=True)
class Score(models.Model):
content = models.OneToOneField(Content, primary_key=True)
counter = models.IntegerField(default=0)