select_related() on IDInternal eliminates most of the relevant rows

due to missing data in other tables, so instead, select on 
InternetDrafts.  This is a little confusing, since the two halves
of the page have different types of objects.

Also add the intended_status, which was also missing in this
template.
 - Legacy-Id: 532
This commit is contained in:
Bill Fenner 2007-06-19 17:19:19 +00:00
parent 2ab8c030f9
commit a3e2da7380
2 changed files with 4 additions and 4 deletions
ietf

View file

@ -8,7 +8,7 @@ import datetime
date_threshold = datetime.datetime.now().date() - datetime.timedelta(days=185)
def inddocs(request):
queryset_list_ind = IDInternal.objects.filter(via_rfc_editor = 1,rfc_flag=0,noproblem=1, dnp=0).select_related().order_by('-internet_drafts.b_approve_date')
queryset_list_ind = InternetDraft.objects.filter(idinternal__via_rfc_editor=1, idinternal__rfc_flag=0, idinternal__noproblem=1, idinternal__dnp=0).order_by('-b_approve_date')
queryset_list_ind_dnp = IDInternal.objects.filter(via_rfc_editor = 1,rfc_flag=0,dnp=1).order_by('-dnp_date')
return object_list(request, queryset=queryset_list_ind, template_name='iesg/independent_doc.html', allow_empty=True, extra_context={'object_list_dnp':queryset_list_ind_dnp })

View file

@ -8,12 +8,12 @@ The RFC Editor receives requests to publish non-IETF Working Group documents as
<h3>Positive IESG Response</h3>
{% regroup object_list by draft.b_approve_date|date:"F j, Y" as dates %}
{% regroup object_list by b_approve_date|date:"F j, Y" as dates %}
{% for date in dates %}
<b>Date Sent: {{ date.grouper }}</b>
<ul>
{% for item in date.list %}
<li><a href="/iesg/ann/detail/{{ item.ballot_id }}/">{{ item.draft.title }}</a>
<li><a href="/iesg/ann/detail/{{ item.idinternal.ballot_id }}/">{{ item.title }} ({{ item.intended_status }})</a>
{% endfor %}
</ul>
{% endfor %}
@ -26,7 +26,7 @@ The RFC Editor receives requests to publish non-IETF Working Group documents as
<b>Date Sent: {{ date.grouper }}</b>
<ul>
{% for item in date.list %}
<li><a href="/iesg/ann/detail/{{ item.ballot_id }}/">{{ item.draft.title }}</a>
<li><a href="/iesg/ann/detail/{{ item.ballot_id }}/">{{ item.draft.title }} ({{item.draft.intended_status }})</a>
{% endfor %}
</ul>
{% endfor %}