擅长:python、mysql、java
<p>我相信你在找<a href="https://docs.djangoproject.com/en/1.3/topics/db/aggregation/" rel="nofollow">^{<cd1>}</a>:</p>
<pre><code>total_list = plan.investment_set.filter(
maturity_date__gte= '%s-1-1' % current_year
).aggregate(Sum('maturity_amount'))
</code></pre>
<p>这会给你:</p>
^{pr2}$