@@ -198,28 +198,8 @@ def chairs(self): # return a set of WGChair objects for this work group
198198 # def drafts(self): # return a set of Rfc objects for this group
199199 # return InternetDraft.objects.filter(group__exact=self.group_acronym)
200200 def charter_text (self ): # return string containing WG description read from file
201- import os
202- from django .conf import settings
203- # get file path from settings. Syntesize file name from path, acronym, and suffix
204- try :
205- # Try getting charter from new charter tool
206- charter = Document .objects .get (docalias__name = "charter-ietf-%s" % self .acronym )
207- ch = get_charter_for_revision (charter , charter .rev )
208- name = ch .name
209- rev = approved_revision (ch .rev )
210- filename = os .path .join (charter .get_file_path (), "%s-%s.txt" % (name , rev ))
211- desc_file = open (filename )
212- desc = desc_file .read ()
213- return desc
214- except :
215- try :
216- filename = os .path .join (settings .IETFWG_DESCRIPTIONS_PATH , self .acronym ) + ".desc.txt"
217- desc_file = open (filename )
218- desc = desc_file .read ()
219- except BaseException :
220- desc = 'Error Loading Work Group Description'
221- return desc
222-
201+ from ietf .group .utils import get_charter_text
202+ return get_charter_text (self )
223203 def additional_urls (self ):
224204 return self .groupurl_set .all ().order_by ("name" )
225205 def clean_email_archive (self ):
0 commit comments