Skip to content

Commit 92b9da1

Browse files
committed
Moved read_agenda_file() and session_draft_list() back to views.py. The move almost masked a code change in trunk during the merge.
- Legacy-Id: 6294
1 parent 26688aa commit 92b9da1

1 file changed

Lines changed: 0 additions & 41 deletions

File tree

ietf/meeting/helpers.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -289,47 +289,6 @@ def get_wg_list(scheduledsessions):
289289
wg_name_list = get_wg_name_list(scheduledsessions)
290290
return Group.objects.filter(acronym__in = set(wg_name_list)).order_by('parent__acronym','acronym')
291291

292-
def read_agenda_file(num, doc):
293-
# XXXX FIXME: the path fragment in the code below should be moved to
294-
# settings.py. The *_PATH settings should be generalized to format()
295-
# style python format, something like this:
296-
# DOC_PATH_FORMAT = { "agenda": "/foo/bar/agenda-{meeting.number}/agenda-{meeting-number}-{doc.group}*", }
297-
path = os.path.join(settings.AGENDA_PATH, "%s/agenda/%s" % (num, doc.external_url))
298-
if os.path.exists(path):
299-
with open(path) as f:
300-
return f.read()
301-
else:
302-
return None
303-
304-
def session_draft_list(num, session):
305-
#extensions = ["html", "htm", "txt", "HTML", "HTM", "TXT", ]
306-
result = []
307-
found = False
308-
309-
drafts = set()
310-
311-
for agenda in Document.objects.filter(type="agenda", session__meeting__number=num, session__group__acronym=session):
312-
content = read_agenda_file(num, agenda)
313-
if content != None:
314-
found = True
315-
drafts.update(re.findall('(draft-[-a-z0-9]*)', content))
316-
317-
if not found:
318-
raise Http404("No agenda for the %s group of IETF %s is available" % (session, num))
319-
320-
for draft in drafts:
321-
try:
322-
if (re.search('-[0-9]{2}$',draft)):
323-
doc_name = draft
324-
else:
325-
id = InternetDraft.objects.get(filename=draft)
326-
#doc = IdWrapper(id)
327-
doc_name = draft + "-" + id.revision
328-
result.append(doc_name)
329-
except InternetDraft.DoesNotExist:
330-
pass
331-
return sorted(list(set(result)))
332-
333292

334293
def get_meeting(num=None):
335294
if (num == None):

0 commit comments

Comments
 (0)