Skip to content

Commit 2092927

Browse files
committed
Show 'cleaned' URLs for WG email archives (on /wg/acronym/charter/)
- Legacy-Id: 2069
1 parent f8abdf9 commit 2092927

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

ietf/idtracker/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,11 @@ def charter_text(self): # return string containing WG description read from file
843843

844844
def additional_urls(self):
845845
return AreaWGURL.objects.filter(name=self.group_acronym.acronym)
846-
846+
def clean_email_archive(self):
847+
x = self.email_archive
848+
# remove "current/" and "maillist.html"
849+
x = re.sub("^(http://www\.ietf\.org/mail-archive/web/)([^/]+/)(current/)?([a-z]+\.html)?$", "\\1\\2", x)
850+
return x
847851
class Meta:
848852
db_table = 'groups_ietf'
849853
ordering = ['?'] # workaround django wanting to sort by acronym but not joining with it

ietf/templates/wginfo/wg_charter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
<tr><td>Address:</td><td><a href="mailto:{{ wg.email_address }}">{{ wg.email_address }}</a></td></tr>
9494
<tr><td>To Subscribe:</td><td><a href="{{ wg.email_subscribe }}">{{ wg.email_subscribe }}</a></td></tr>
95-
<tr><td>Archive:</td><td><a href="{{ wg.email_archive }}">{{ wg.email_archive }}</a></td></tr>
95+
<tr><td>Archive:</td><td><a href="{{ wg.clean_email_archive }}">{{ wg.clean_email_archive }}</a></td></tr>
9696

9797
<tr>
9898
<td colspan="2">

0 commit comments

Comments
 (0)