Hello,
Is it possible to order a query by a ManyToManyField? For example,
in the models below, I'd like to select all Entries and order by the
Author's name. Something to the effect of Entry.objects.all
().order_by('authors__name')?
Thanks,
Brian
class Author(models.Model):
name = m
Russell,
Just wanted to thank you for responding to my post. You did
interpret my question correctly, though I was obviously hoping to
avoid using raw SQL. Anyway, thanks again.
Brian
On Apr 12, 2006, at 1:10 AM, Russell Cloran wrote:
>
> Hi,
>
> On Tue, 2006-04-11 at 21:20 -0400, Max Ba
Max,
Just wanted to thank you for responding to my question. You are
correct that the list comprehension is pythonic, though I was ideally
looking for a efficient method from a database perspective.
Thanks,
Brian
On Apr 12, 2006, at 2:16 AM, Max Battcher wrote:
>
> Russell Cloran wrote:
>
Suppose I have the following two model objects:
class Tag(models.Model):
name = models.CharField(maxlength=10)
class Article(models.Model):
tags = models.ManyToManyField(Tag)
Each Article can be associated with multiple Tags and vice versa.
How can I query the Tag model to o
Hey folks,
Is there a recommended way to do logging in a production
environment? Should I just use Python's logging module or is there a
built-in way to do this? (I am using the M-R branch.)
Thanks,
Brian
PS: I'm a new user, so forgive me if I'm asking the obvious...
--~--~-~--
5 matches
Mail list logo