This appears to be a new feature.
Is there any way of doing this in 1.0? Other than dropping into SQL
that is.
Graeme
On Jun 17, 8:04 pm, Alex Gaynor wrote:
> On Wed, Jun 17, 2009 at 10:00 AM, R C wrote:
>
> > Thanks for your fast reply
>
> > I realize that there is no "count" field in m
Thanks, it worked!
Both of you have been very helpful.
On Jun 17, 5:04 pm, Alex Gaynor wrote:
> On Wed, Jun 17, 2009 at 10:00 AM, R C wrote:
>
> > Thanks for your fast reply
>
> > I realize that there is no "count" field in my article model. However
> > in my templates I am able to do thi
On Wed, Jun 17, 2009 at 10:00 AM, R C wrote:
>
> Thanks for your fast reply
>
> I realize that there is no "count" field in my article model. However
> in my templates I am able to do things like:
> Author.article_set.count
>
> I just can't do the same thing in my views when building a
> que
Thanks for your fast reply
I realize that there is no "count" field in my article model. However
in my templates I am able to do things like:
Author.article_set.count
I just can't do the same thing in my views when building a
queryset.I would really like to be able to select Authors and
On Jun 17, 1:12 pm, R C wrote:
> Hi,
>
> I would like to be able to select objects and order them by the count
> of a related field
>
> For example, I have 2 models:
>
> class Author(models.Model)
> name = models.Charfield(max_length=20)
>
> class Article(models.Model)
> author = models.F
Hi,
I would like to be able to select objects and order them by the count
of a related field
For example, I have 2 models:
class Author(models.Model)
name = models.Charfield(max_length=20)
class Article(models.Model)
author = models.ForeignKey(Author)
content = models.TextField()
6 matches
Mail list logo