google-code-export / django-forum

Automatically exported from code.google.com/p/django-forum
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

using property introduces bug? #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Thread.objects.filter().order_by('-thread_latest_post')[:10]

Not sure if the above code is supposed to work or not, but it did in
previous versions.  Now I just get:

FieldError: Cannot resolve keyword 'thread_latest_post' into field. Choices
are: closed, forum, id, latest_post_time, post, posts, sticky,
subscription, title, views

Seems by using the thread_latest_post = property(_get_thread_latest_post)
pattern in the model may have broken something.  Or this may be a bug in
Django or my code?

Original issue reported on code.google.com by mand...@gmail.com on 8 Aug 2008 at 3:36

GoogleCodeExporter commented 9 years ago
This line isn't in the codebase any more so it isn't an issue.

If you want to do something similar, try this:

    Thread.objects.filter().order_by('-latest_post_time')[:10]

Original comment by rwpoul...@gmail.com on 7 Oct 2008 at 7:56