Ignore that question! That was a bit stupid, the Notes are passed with the pages as page.note_set.all()... or something to that effect.
On Dec 12, 12:34 pm, bjornkri <[EMAIL PROTECTED]> wrote: > I've a feeling I'm going about this completely wrong... > > So I have a model called Page, and each Page can have a number of > Notes. > > Now, I'm displaying the pages with a generic view, and I thought I'd > pass the Notes along as extra_context. It looks somewhat like this: > > (r'^pages/(?P<object_id>\d+)/$', > 'django.views.generic.list_detail.object_detail', { 'queryset' : > Page.objects.all(), 'extra_context' : {'notes' : > Note.objects.filter(page__id__exact=1)}}), > > And that works, with the '1' hard coded. But how can I pass the number > defined in <object_id> to the filter? Should I do this somehow > completely differently? > > Thanks, > -Björn --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---