My guess is a select_related('follow') call somewhere is causing the issue.
The behavior for select_related() changed in 1.8.

Can you post the entire trace back?

-James
On May 18, 2015 4:49 PM, "Galia Ladiray" <poline.b...@gmail.com> wrote:

> Hi,
> I wonder if anyone can help me, or just share the pain ...
>
> I have some code that goes like this (this is a very simplified version of
> my code):
> ---------------------------------------------------------------------
> class Follower(models.Model):
>     follower = models.ForeignKey(MyUser, related_name='followed_by')
>     followed = models.ForeignKey(MyUser, related_name='follow')
>
> Class MyUser(models.Model):
>    .... some fields
>
>     def get_followed(self, limit=16):
>         return MyUser.objects.filter(follow__follower__id=self.pk)
> ---------------------------------------------------------------------
>
> This used to work fine, BUT after upgrade to django 1.8 I get an error
> message:
>
> Cannot resolve keyword 'follow' into field. Choices are: (some fields and 
> ...), follow
>
> (which is a bit frustrating error message)
>
> I tried to recreate this on a new project (so I can post real code!) but I
> cannot recreate the error, maybe something to do with the way tables were
> names before and are named now on the DB?
> I have a feeling it is something to do with the django 1.7 application
> loader (regarding naming) but it used to work fine in 1.7
>
> Any ideas will be highly appreciated
>
> Thanks
> Galia Ladiray-Weiss
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d58285fb-b7cd-40c7-9750-ee89b3bddc54%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/d58285fb-b7cd-40c7-9750-ee89b3bddc54%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciV%3DDeqZObti%2Bjwfm-yU6cgU0dAbNJfYVA7XQfKO6F0y1w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to