Replaced /liaison/managers/ with direct to static page on www.ietf.org

- Legacy-Id: 1638
This commit is contained in:
Pasi Eronen 2009-08-13 16:03:41 +00:00
parent 9b64a11dfc
commit 8e85a27452
5 changed files with 49 additions and 72 deletions

View file

@ -7,6 +7,9 @@ ietfdb (2.32)
* Make Django testing framework work again. From Pasi.
* Minor fixes to bugs found by the testing framework. From Pasi.
* Replaced /liaison/managers/ with redirect to static page
on www.ietf.org. From Pasi.
-- Henrik Levkowetz <henrik@levkowetz.com>

View file

@ -96,45 +96,50 @@ class LiaisonDetail(models.Model):
class Admin:
pass
class SDOs(models.Model):
sdo_id = models.AutoField(primary_key=True)
sdo_name = models.CharField(blank=True, maxlength=255)
def __str__(self):
return self.sdo_name
def liaisonmanager(self):
try:
return self.liaisonmanagers_set.all()[0]
except:
return None
class Meta:
db_table = 'sdos'
class Admin:
pass
# This table is not used by any code right now, and according to Glen,
# probably not currently (Aug 2009) maintained by the secretariat.
#class SDOs(models.Model):
# sdo_id = models.AutoField(primary_key=True)
# sdo_name = models.CharField(blank=True, maxlength=255)
# def __str__(self):
# return self.sdo_name
# def liaisonmanager(self):
# try:
# return self.liaisonmanagers_set.all()[0]
# except:
# return None
# class Meta:
# db_table = 'sdos'
# class Admin:
# pass
class LiaisonManagers(models.Model):
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag', raw_id_admin=True)
email_priority = models.IntegerField(null=True, blank=True, core=True)
sdo = models.ForeignKey(SDOs, edit_inline=models.TABULAR, num_in_admin=1)
def email(self):
try:
return self.person.emailaddress_set.get(priority=self.email_priority)
except ObjectDoesNotExist:
return None
class Meta:
db_table = 'liaison_managers'
# This table is not used by any code right now, and according to Glen,
# probably not currently (Aug 2009) maintained by the secretariat.
#class LiaisonManagers(models.Model):
# person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag', raw_id_admin=True)
# email_priority = models.IntegerField(null=True, blank=True, core=True)
# sdo = models.ForeignKey(SDOs, edit_inline=models.TABULAR, num_in_admin=1)
# def email(self):
# try:
# return self.person.emailaddress_set.get(priority=self.email_priority)
# except ObjectDoesNotExist:
# return None
# class Meta:
# db_table = 'liaison_managers'
class LiaisonsInterim(models.Model):
title = models.CharField(blank=True, maxlength=255)
submitter_name = models.CharField(blank=True, maxlength=255)
submitter_email = models.CharField(blank=True, maxlength=255)
submitted_date = models.DateField(null=True, blank=True)
from_id = models.IntegerField(null=True, blank=True)
def __str__(self):
return self.title
class Meta:
db_table = 'liaisons_interim'
class Admin:
pass
# This table is not used by any code right now.
#class LiaisonsInterim(models.Model):
# title = models.CharField(blank=True, maxlength=255)
# submitter_name = models.CharField(blank=True, maxlength=255)
# submitter_email = models.CharField(blank=True, maxlength=255)
# submitted_date = models.DateField(null=True, blank=True)
# from_id = models.IntegerField(null=True, blank=True)
# def __str__(self):
# return self.title
# class Meta:
# db_table = 'liaisons_interim'
# class Admin:
# pass
class Uploads(models.Model):
file_id = models.AutoField(primary_key=True)

View file

@ -5,7 +5,8 @@
200 /liaison/458/ # non-ASCII title
200 /liaison/471/ # non-ASCII body and submitter name
200 /liaison/managers/
301 /liaison/managers/
200 /liaison/help/to_ietf/
200 /liaison/help/from_ietf/
200 /liaison/help/fields/

View file

@ -1,7 +1,7 @@
# Copyright The IETF Trust 2007, All Rights Reserved
from django.conf.urls.defaults import patterns
from ietf.liaisons.models import LiaisonDetail, LiaisonManagers
from ietf.liaisons.models import LiaisonDetail
info_dict = {
'queryset': LiaisonDetail.objects.all().order_by("-submitted_date"),
@ -11,7 +11,6 @@ info_dict = {
urlpatterns = patterns('django.views.generic.list_detail',
(r'^$', 'object_list', info_dict),
(r'^(?P<object_id>\d+)/$', 'object_detail', info_dict),
(r'^managers/$', 'object_list', { 'queryset': LiaisonManagers.objects.all().select_related().order_by('sdos.sdo_name') }), #XXX order_by relies on select_related()
)
urlpatterns += patterns('django.views.generic.simple',
@ -19,4 +18,5 @@ urlpatterns += patterns('django.views.generic.simple',
(r'^help/fields/$', 'direct_to_template', {'template': 'liaisons/field_help.html'}),
(r'^help/from_ietf/$', 'direct_to_template', {'template': 'liaisons/guide_from_ietf.html'}),
(r'^help/to_ietf/$', 'direct_to_template', {'template': 'liaisons/guide_to_ietf.html'}),
(r'^managers/$', 'redirect_to', { 'url': 'http://www.ietf.org/liaison/managers.html' })
)

View file

@ -1,32 +0,0 @@
{# Copyright The IETF Trust 2007, All Rights Reserved #}
{% extends "base.html" %}
{% block title %}IETF Liaison Managers{% endblock %}
{% block content %}
<center><font size=+2>IETF Liaison Managers</font></center>
<br>
The table below contains the names and e-mail addresses of the IETF Liaison Managers for all Standards Development Organizations (SDOs) with which the IETF has a formal liaison relationship. Please include the applicable IETF Liaison Manager in the Cc list of every liaison statement sent to or by one of these SDOs.<br><br>
<table cellpadding="4" cellspacing="0" border="1">
<tr align="center">
<td rowspan="2"><b>SDO</b></td><td colspan="2"><b>IETF Liaison Manager</b></td>
</tr>
<tr align="center">
<td><b>Name</b></td><td>E-mail Address</td>
</tr>
{% for manager in object_list %}
<tr>
<td>{{ manager.sdo.sdo_name }}
{# this belongs in the database! #}
{% ifequal manager.sdo.sdo_name "ITU-T SG 15" %}
<br>(optical control plane)
{% endifequal %}
</td>
<td>{{ manager.person }}</td>
<td>{{ manager.email }}</td>
</tr>
{% endfor %}
</table>
<br><br><br>
{% endblock %}