|
1 | 1 | from django.conf.urls.defaults import * |
2 | 2 | from ietf.iesg.models import TelechatMinutes |
| 3 | +from ietf.idtracker.models import BallotInfo, IDInternal, InternetDraft |
| 4 | +import datetime |
3 | 5 |
|
| 6 | +date_threshold = datetime.datetime.now().date() - datetime.timedelta(days=185) |
4 | 7 |
|
5 | 8 | #urlpatterns = patterns('django.views.generic.list_detail', |
6 | 9 | # (r'^lastcall/$', 'object_list', { |
|
14 | 17 | } |
15 | 18 | telechat_archive = dict(telechat_detail, allow_empty=True) |
16 | 19 |
|
| 20 | +queryset_ann = BallotInfo.objects.all() |
| 21 | + |
| 22 | +queryset_list = InternetDraft.objects.filter(b_approve_date__gte = date_threshold, intended_status__in=[1,2,6,7],idinternal__via_rfc_editor=0).order_by("-b_approve_date") |
| 23 | + |
| 24 | +queryset_list_doc = InternetDraft.objects.filter(b_approve_date__gte = date_threshold, intended_status__in=[3,5],idinternal__via_rfc_editor=0).order_by("-b_approve_date") |
| 25 | + |
| 26 | +queryset_list_old = InternetDraft.objects.filter(b_approve_date__lt = date_threshold, b_approve_date__gte = '1995-1-1', intended_status__in=[1,2,6,7]).order_by("-b_approve_date") |
| 27 | + |
| 28 | +queryset_list_old_doc = InternetDraft.objects.filter(b_approve_date__lt = date_threshold, b_approve_date__gte = '1995-1-1', intended_status__in=[3,5]).order_by("-b_approve_date") |
| 29 | + |
| 30 | +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') |
| 31 | + |
| 32 | +queryset_list_ind_dnp = IDInternal.objects.filter(via_rfc_editor = 1,rfc_flag=0,dnp=1).order_by('-dnp_date') |
| 33 | + |
17 | 34 | urlpatterns = patterns('django.views.generic.date_based', |
18 | 35 | (r'^telechat/$', 'archive_index', telechat_archive), |
19 | 36 | (r'^telechat/(?P<year>\d{4})/$', 'archive_year', telechat_archive), |
|
22 | 39 |
|
23 | 40 | urlpatterns += patterns('django.views.generic.list_detail', |
24 | 41 | (r'^telechat/detail/(?P<object_id>\d+)/$', 'object_detail', { 'queryset': queryset }), |
| 42 | + (r'^ann/detail/(?P<object_id>\d+)/$', 'object_detail', { 'queryset': queryset_ann }), |
| 43 | + (r'^ann/ietf-doc/$', 'object_list', { 'queryset':queryset_list, 'template_name': 'iesg/ietf_doc.html', 'extra_context': { 'object_list_doc':queryset_list_doc, 'is_recent':1 } }), |
| 44 | + (r'^ann/ietf-doc/recent/$', 'object_list', { 'queryset':queryset_list, 'template_name': 'iesg/ietf_doc.html', 'extra_context': { 'object_list_doc':queryset_list_doc, 'is_recent':1 } }), |
| 45 | + (r'^ann/ietf-doc/previous/$', 'object_list', { 'queryset':queryset_list_old, 'template_name': 'iesg/ietf_doc.html', 'extra_context': { 'object_list_doc':queryset_list_old_doc } }), |
| 46 | + (r'^ann/independent/$', 'object_list', { 'queryset':queryset_list_ind, 'template_name': 'iesg/independent_doc.html', 'extra_context': { 'object_list_dnp':queryset_list_ind_dnp } }), |
25 | 47 | ) |
0 commit comments