Hi All,

I'm back around to working out how to best implement related items,
since you can't manytomany join onto self I plan to do a calculation
and cache the result.

What I would like to do is to have a post (eg. a blog post) object and
then be able to have something like the following in my template:

{% for related in post.getRelated %}
........

where getRelated is a method of the actual post model which returns a
list of related posts. Setting this up isn't a problem and doing the
calculations isn't a problem, though where I'm stuck is how can I get
a list of posts from within a post object, if I was anywhere else I
would call something like posts.get_list(...), though clearly this
won't work from within an object that is trying to get a list of
itselfs (great english eh ;)

I've tried self.get_list though obviously it doesn't exist.

Any help appreciated.

Reply via email to