Skip to content

Commit 98d6db0

Browse files
committed
Replaced /drafts/all_id.html with redirect (there are no links to it, and according to logs nobody is using it)
- Legacy-Id: 1965
1 parent 97af58c commit 98d6db0

5 files changed

Lines changed: 3 additions & 137 deletions

File tree

ietf/idindex/testurl.list

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
200 /drafts/draft-ietf-dnsext-dnssec-protocol/
1616
200 /drafts/draft-ietf-dnsext-dnssec-protocol/
1717
200 /drafts/draft-shockey-enum-cnam/ # non-ASCII title and abstract
18-
200,heavy /drafts/all_id_txt.html
19-
200,heavy /drafts/all_id.html
18+
301 /drafts/all_id_txt.html
19+
301 /drafts/all_id.html
2020
200 /drafts/
2121
200 /drafts/wg/11/
2222
200 /drafts/?filename=mobike

ietf/idindex/urls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
(r'^(?P<slug>[^/]+)/related/$', views.view_related_docs),
3030
(r'^(?P<object_id>\d+)/$', views.redirect_id),
3131
(r'^(?P<slug>[^/]+)/$', views.view_id, dict(info_dict, slug_field='filename')),
32-
(r'^all_id_txt.html$', views.all_id, { 'template_name': 'idindex/all_id_txt.html' }),
33-
(r'^all_id.html$', views.all_id, { 'template_name': 'idindex/all_id.html' }),
32+
(r'^all_id(?:_txt)?.html$', 'django.views.generic.simple.redirect_to', { 'url': 'http://www.ietf.org/id/all_id.txt' }),
3433
(r'^$', views.search),
3534
)
3635

ietf/idindex/views.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -184,24 +184,6 @@ def search(request):
184184
})
185185
return HttpResponse(t.render(c))
186186

187-
def all_id(request, template_name):
188-
from django.db import connection
189-
from ietf.utils import flattenl
190-
cursor = connection.cursor()
191-
# 99 = Dead
192-
# 32 = RFC Published
193-
cursor.execute("SELECT id_document_tag FROM id_internal WHERE rfc_flag=0 AND cur_state NOT IN (99,32)")
194-
in_tracker = flattenl(cursor.fetchall())
195-
tracker_list = InternetDraft.objects.all().filter(id_document_tag__in=in_tracker).order_by('status','filename').select_related(depth=1)
196-
object_list = []
197-
for o in tracker_list:
198-
object_list.append({'tracker': True, 'id': o})
199-
notracker_list = InternetDraft.objects.all().exclude(id_document_tag__in=in_tracker).order_by('status','filename').select_related(depth=1)
200-
for o in notracker_list:
201-
object_list.append({'tracker': False, 'id': o})
202-
return render_to_response(template_name, {'object_list': object_list},
203-
context_instance=RequestContext(request))
204-
205187
def all_id_txt():
206188
all_ids = InternetDraft.objects.order_by('filename')
207189
in_track_ids = all_ids.filter(idinternal__rfc_flag=0).exclude(idinternal__cur_state__in=IDInternal.INACTIVE_STATES)

ietf/templates/idindex/all_id.html

Lines changed: 0 additions & 62 deletions
This file was deleted.

ietf/templates/idindex/all_id_txt.html

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)