On Tue, Jul 31, 2012 at 11:15 PM, Karl Sutt <k...@sutt.ee> wrote:

> So, in conclusion, Lachlan, you would want to do something like:
>
>  def get_context_data(self,**kwargs):
>>         #Call the base implementation first to get a context
>>         context = super(PersonDetailView, self).get_context_data(**kwargs)
>>         #Add in a querysets
>>         context['job_list'] =
>> Vacancy.complete.filter(person_id=self.kwargs[self.pk_url_kwarg])
>>         context['certificate_list'] =
>> Certificate.objects.filter(person_id=self.kwargs[self.pk_url_kwarg])
>>         context['claim_list'] =
>> Compensation.objects.filter(person_id=self.kwargs[self.pk_url_kwarg])
>>         return context
>
>
> I have not tested this, but it gives you the idea. You'll want to filter
> the Vacancy, Certificate and Compensation objects by the person's ID.
>

Great - thanks!

L,

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to