After following the tutorial for Django, I have the baseline of my app up and running, but now I am trying to add some data to one of the templates. I thought I could add this by using extra_context but I am missing something (likely obvious, as I am new to Django). This is what I have in my app's urls.py:
url(r'^$', ListView.as_view(
queryset=Solicitation.objects.order_by('-modified'),
context_object_name='solicitationList',
template_name='ptracker/index.html',
extra_context=Solicitation.objects.aggregate(Sum('solicitationValue'),Sum('anticipatedValue')),
name='index',
)),
The error I am getting is TypeError :
ListView() received an invalid keyword 'extra_context'
What I need to do is somehow get those sums out to the template so that I can display them. How can I do this properly or easily?