Merged in Chris' replacement pages for the perl-generated WG overview page, the 1wg-summary.txt and 1wg-summary-by-acronym.txt pages.
- Legacy-Id: 1421
This commit is contained in:
parent
3a69ba3d80
commit
b9870f0dfc
|
@ -93,6 +93,15 @@ class Area(models.Model):
|
|||
list_display = ('area_acronym', 'status')
|
||||
pass
|
||||
|
||||
class AreaURL(models.Model):
|
||||
area = models.ForeignKey(Area, db_column='area_acronym_id', edit_inline=models.STACKED, num_in_admin=1, null=True, related_name='urls')
|
||||
url = models.URLField(maxlength=255, db_column='url_value')
|
||||
url_label = models.CharField(maxlength=255, db_column='url_label')
|
||||
def __str__(self):
|
||||
return self.url
|
||||
class Admin:
|
||||
pass
|
||||
|
||||
class IDStatus(models.Model):
|
||||
status_id = models.AutoField(primary_key=True)
|
||||
status = models.CharField(maxlength=25, db_column='status_value')
|
||||
|
|
|
@ -199,6 +199,14 @@ def rfcnospace(string):
|
|||
else:
|
||||
return string
|
||||
|
||||
@register.filter(name='dashify')
|
||||
def dashify(string):
|
||||
"""
|
||||
Replace each character in string with '-', to produce
|
||||
an underline effect for plain text files.
|
||||
"""
|
||||
return re.sub('.', '-', string)
|
||||
|
||||
@register.filter(name='lstrip')
|
||||
def lstripw(string, chars):
|
||||
"""Strip matching leading characters from words in string"""
|
||||
|
|
14
ietf/templates/wginfo/summary-by-acronym.txt
Normal file
14
ietf/templates/wginfo/summary-by-acronym.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
IETF Working Group Summary (By Acronym)
|
||||
|
||||
|
||||
The following Area Abreviations are used in this document
|
||||
{% for area in area_list %}
|
||||
{{ area }} - {{ area.area_acronym.name }}{% endfor %}
|
||||
{% for wg in wg_list|dictsort:"group_acronym.acronym" %}{% if wg.start_date %}
|
||||
{{ wg.group_acronym.name }} ({{ wg }}) -- {{ wg.area.area|upper }}
|
||||
{% for chair in wg.wgchair_set.all %}{% if forloop.first %} Chair{{ forloop.revcounter|pluralize:": ,s:" }} {% else %} {% endif %}{{ chair.person }} <{{ chair.person.email.1 }}>
|
||||
{% endfor %} WG Mail: {{ wg.email_address }}
|
||||
To Join: {{ wg.email_subscribe }}{%if wg.email_keyword %}
|
||||
In Body: {{ wg.email_keyword }}{% endif %}
|
||||
Archive: {{ wg.email_archive }}
|
||||
{% endif %}{% endfor %}
|
13
ietf/templates/wginfo/summary-by-area.txt
Normal file
13
ietf/templates/wginfo/summary-by-area.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% load ietf_filters %} IETF Working Group Summary (By Area)
|
||||
{% regroup wg_list|dictsort:"area_acronym.acronym" by area.area as wga_list %}{% for area in wga_list %}{% for wg in area.list|dictsort:"group_acronym.acronym" %}{% ifequal wg.area.area.status_id 1 %}{% if forloop.first %}
|
||||
{{ wg.area_acronym.name }} ({{ wg.area_acronym }})
|
||||
{{ wg.area_acronym.name|dashify }}------{% for ad in wg.area_directors %}
|
||||
{{ ad.person }} <{{ ad.person.email.1 }}>{% endfor %}
|
||||
{% endif %}{% if wg.start_date %}
|
||||
{{ wg.group_acronym.name }} ({{ wg }})
|
||||
{% for chair in wg.wgchair_set.all %}{% if forloop.first %} Chair{{ forloop.revcounter|pluralize:": ,s:" }} {% else %} {% endif %}{{ chair.person }} <{{ chair.person.email.1 }}>
|
||||
{% endfor %} WG Mail: {{ wg.email_address }}
|
||||
To Join: {{ wg.email_subscribe }}{%if wg.email_keyword %}
|
||||
In Body: {{ wg.email_keyword }}{% endif %}
|
||||
Archive: {{ wg.email_archive }}
|
||||
{% endif %}{% endifequal %}{% endfor %}{% endfor %}
|
74
ietf/templates/wginfo/wg-dir.html
Normal file
74
ietf/templates/wginfo/wg-dir.html
Normal file
|
@ -0,0 +1,74 @@
|
|||
{% extends "base.html" %}
|
||||
{# Copyright The IETF Trust 2009, All Rights Reserved #}
|
||||
|
||||
{% block title %} Active IETF Working Groups {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<hr/>
|
||||
<h1>Active IETF Working Groups</h1>
|
||||
<hr/>
|
||||
<p>
|
||||
Old WG pages can be found in the <a href="http://www.ietf.org/html.charters/OLD/index.html">Concluded WG Index</a>.
|
||||
</p>
|
||||
<p>
|
||||
Archived WG Charters can be found in the <a href="http://www.ietf.org/html.charters/HISTORY/">Historic Charter Index</a>.
|
||||
</p>
|
||||
<hr/>
|
||||
<h2>Table of Contents</h2>
|
||||
<ul>
|
||||
{% regroup wg_list|dictsort:"area.area.area_acronym.acronym" by area.area as wga_list %}
|
||||
{% for area in wga_list %}
|
||||
{% for wg in area.list|dictsort:"group_acronym.acronym" %}
|
||||
{% ifequal wg.area.area.status_id 1 %}
|
||||
{% if forloop.first %}
|
||||
<li><a href="#{{ wg.area_acronym.name|cut:" " }}">{{ wg.area_acronym.name }}</a></li>
|
||||
{% endif %}
|
||||
{% endifequal %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% for area in wga_list %}
|
||||
{% for wg in area.list|dictsort:"group_acronym.acronym" %}
|
||||
{% ifequal wg.area.area.status_id 1 %}
|
||||
{% if forloop.first %}
|
||||
<hr/>
|
||||
<a name="{{ wg.area_acronym.name|cut:" " }}"></a>
|
||||
<h2>{{ wg.area_acronym.name }}</h2>
|
||||
{% for ad in wg.area_directors %}
|
||||
{% if forloop.first %}
|
||||
<p>Area Director{{ forloop.revcounter|pluralize }}:</p>
|
||||
<ul>
|
||||
{% endif %}
|
||||
<li><a href="mailto:{{ ad.person.email.1|escape }}">{{ ad.person }} <{{ ad.person.email.1 }}></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% for url in wg.area.urls %}
|
||||
{% if forloop.first %}
|
||||
<p>Additional Area Information:</p>
|
||||
<ul>
|
||||
{% endif %}
|
||||
<li><a href="{{url.url}}">{{url.url_label}}</a></li>
|
||||
{% if forloop.last %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<p>Working Groups:</p>
|
||||
<table>
|
||||
<colgroup align="center">
|
||||
<col width="10%"/>
|
||||
<col width="10%"/>
|
||||
<col width="80%"/>
|
||||
</colgroup>
|
||||
{% endif %}
|
||||
{% if wg.start_date %}
|
||||
<tr><td></td><td><a href="http://www.ietf.org/html.charters/{{ wg|escape }}-charter.html">{{ wg|escape }}</a></td><td>{{ wg.group_acronym.name|escape }}</td></tr>
|
||||
{% endif %}
|
||||
{% if forloop.last %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endifequal %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endblock %}
|
|
@ -54,6 +54,7 @@ urlpatterns = patterns('',
|
|||
(r'^meeting/', include('ietf.meeting.urls')),
|
||||
(r'^accounts/', include('ietf.ietfauth.urls')),
|
||||
(r'^doc/', include('ietf.idrfc.urls')),
|
||||
(r'^wg/', include('ietf.wginfo.urls')),
|
||||
|
||||
(r'^$', 'ietf.redirects.views.redirect'),
|
||||
|
||||
|
|
2
ietf/wginfo/__init__.py
Normal file
2
ietf/wginfo/__init__.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Copyright The IETF Trust 2008, All Rights Reserved
|
||||
|
4
ietf/wginfo/models.py
Normal file
4
ietf/wginfo/models.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Copyright The IETF Trust 2008, All Rights Reserved
|
||||
|
||||
from django.db import models
|
||||
from ietf.idtracker.models import Acronym, Area, IETFWG
|
11
ietf/wginfo/urls.py
Normal file
11
ietf/wginfo/urls.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Copyright The IETF Trust 2008, All Rights Reserved
|
||||
|
||||
from django.conf.urls.defaults import patterns
|
||||
from ietf.wginfo import views
|
||||
|
||||
urlpatterns = patterns('',
|
||||
(r'^$', views.wg_dir),
|
||||
(r'^summary.txt', views.wg_summary_area),
|
||||
(r'^summary-by-area.txt', views.wg_summary_area),
|
||||
(r'^summary-by-acronym.txt', views.wg_summary_acronym),
|
||||
)
|
24
ietf/wginfo/views.py
Normal file
24
ietf/wginfo/views.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Copyright The IETF Trust 2008, All Rights Reserved
|
||||
|
||||
from ietf.idtracker.models import Area, AreaStatus, AreaDirector, IETFWG, WGChair
|
||||
from django.shortcuts import get_object_or_404, render_to_response
|
||||
from django.template import RequestContext, loader
|
||||
from django.db.models import Q
|
||||
from django.http import HttpResponse
|
||||
from django.contrib.sites.models import Site
|
||||
from ietf.contrib import wizard, form_decorator
|
||||
from ietf.utils.mail import send_mail_subj
|
||||
from datetime import datetime
|
||||
|
||||
def wg_summary_acronym(request):
|
||||
areas = Area.objects.filter(status='1')
|
||||
wgs = IETFWG.objects.filter(status='1')
|
||||
return HttpResponse(loader.render_to_string('wginfo/summary-by-acronym.txt', {'area_list': areas, 'wg_list': wgs}),mimetype='text/plain; charset=UTF-8')
|
||||
|
||||
def wg_summary_area(request):
|
||||
wgs = IETFWG.objects.filter(status='1',start_date__isnull=False)
|
||||
return HttpResponse(loader.render_to_string('wginfo/summary-by-area.txt', {'wg_list': wgs}),mimetype='text/plain; charset=UTF-8')
|
||||
|
||||
def wg_dir(request):
|
||||
wgs = IETFWG.objects.filter(status='1',start_date__isnull=False)
|
||||
return render_to_response('wginfo/wg-dir.html', {'wg_list': wgs}, RequestContext(request))
|
Loading…
Reference in a new issue