On 23 sep, 01:26, gaz <[EMAIL PROTECTED]> wrote:
> Thanks Bruno,
>
> I'd already tried that - I noticed that with or without the
> use_for_related_field

FWIW, it's a plural, ie "use_for_related_field*s*" - but I assume the
typo wasn't in your code.

Out of curiousity, which Django version are you using ?

>  being set on the Custom Manager the effect was
> the same - ie. the RelatedManager fires off it's own code without
> actually using the MyCurrentSiteManager instance that is already
> associated with the Model Class.
>
> At the moment my solution has been to do:
>
>   def _get_conferences(self):
>     return Conference.objects.filter(venue=self)
>   conferences = property(_get_conferences)

<ot>
You could refactor it to

   conferences = property(lambda self:
Conference.objects.filter(venue=self))

</ot>

But this doesn't really answer your question...

> I'm not sure this is the best way, but I am basing that on my reading
> athttp://docs.djangoproject.com/en/dev/topics/db/managers/#adding-extra...
> andhttp://docs.djangoproject.com/en/dev/topics/db/models/#model-methods
>
> Any advice on as to whether or not this is the best way to get the
> solution I am after appreciated!

Well... A working solution is by all means better than a broken one,
ins't it !-)

This being said, I'm afraid I can't help much more without installing
your code and tracing it.

Any Django guru around ???

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to