Russ- ah. okay that makes sense. I was assuming that entry_set was a contruct itself, but it's actually modelname_set...
So to make it purely abstract, things are working like this: response_obj = get_object_or_404(Model, param=value) response_obj.modelname_set.all().select_related() and I can just append as many models as have M2M relations with the first? Or is there a better way to do this? Anyway thanks so much for your help, I've got it working now. cheers sng <http://luxagraf.net> On 10/23/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 10/24/06, luxagraf <[EMAIL PROTECTED]> wrote: > > > > "'Tag' object has no attribute 'entry_set'" > > > > Which I believe means that get_object_or_404 is not finding anything > > to return... and yet the correct tag is being passed in and the error > > reporting shows the value of tag being what it should... > > I read this as 'get_object_or_404' is returning an object, but that > object doesn't have an entry_set attribute. If get_object_or_404 was > not finding an object, it would raise a Http404 exception. > > I can't say I know the 23 excuses data model, but if Entry is supposed > to have an m2m or m2m relation with Tag (which is implied by you > requesting tag.entry_set), the error you are reporting would be > consistent with not having added the Entry model to your application. > Without the data model, its difficult to help more than this. > > Yours, > Russ Magee %-) > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---