Hi Malcolm,
I think what I'm going to do now is basically not mix the two models
but make Model B the main model. This will solve another problem I'm
having as well in one go.
Thanks again for all your help.
Mike.
On Jul 9, 2:42 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2008-
On Wed, 2008-07-09 at 06:25 -0700, [EMAIL PROTECTED] wrote:
> Thanks Malcolm for a speedy response!
>
> I guess my best bit is to somehow output the QuerySet into a list
> which I can then order myself (although this seems a bit ugly!), or
> have a rethink about the design of the two models.
If
Thanks Malcolm for a speedy response!
I guess my best bit is to somehow output the QuerySet into a list
which I can then order myself (although this seems a bit ugly!), or
have a rethink about the design of the two models.
Thanks again,
Mike.
On Jul 9, 2:07 pm, Malcolm Tredinnick <[EMAIL PROTE
On Wed, 2008-07-09 at 05:51 -0700, [EMAIL PROTECTED] wrote:
[...]
> I tried using the order_by with two sets of dates:
>
> .order_by('-related_name_to_model__date_field_in_B', '-
> date_field_in_A')
>
> However, this just produces a queryset that is partitioned into two
> separate date ordering
Hi guys,
I'm having a bit of trouble figuring this problem out. I have "Model
A" with a set of fields, one of which is of type DateTimeField with
auto_now_add=True, and the same in a second "Model B". Model B has a
foreign key relationship to Model A.
ModelA:
date_field_in_A = models.
5 matches
Mail list logo