Jorge Gajon wrote:
>
> On 5/19/06, Gábor Farkas <[EMAIL PROTECTED]> wrote:
>> and the strange thing (the reason why i'm reporting this) is that just
>> based on the difference in the "from" statement, i get different results
>> (works in first case, fails in second case).
>>
>
> You should alway
y 10.48.162.16 with SMTP id k16mr3937556nfe;
Mon, 22 May 2006 09:34:07 -0700 (PDT)
Received: by 10.48.223.20 with HTTP; Mon, 22 May 2006 09:34:07 -0700 (PDT)
Message-ID: <[EMAIL PROTECTED]>
Date: Mon, 22 May 2006 11:34:07 -0500
From: "Jorge Gajon" <[EMAIL PROTECTED]>
Jorge Gajon wrote:
>> from proj1.app1.models import User
>> User.objects.get(poll__question__exact='x')
>
>> from app1.models import User
>> User.objects.get(poll__question__exact='x')
>
>
> I don't see any difference except for the 'from' statement.
well, that's it :)
> What 'reverse lookup'
> from proj1.app1.models import User
> User.objects.get(poll__question__exact='x')
> from app1.models import User
> User.objects.get(poll__question__exact='x')
I don't see any difference except for the 'from' statement.
What 'reverse lookup' are you referring to?
--~--~-~--~~--
hi,
i had a problem with reverse-lookups, and found this strange anomaly:
===
class User(models.Model):
name = models.CharField(maxlength=200)
class Poll(models.Model):
question = models.CharField(maxlength=200)
creator = models.ForeignKey(User)
==