Use doc.canonical_name() rather than generating the file name from the group acronym.

- Legacy-Id: 4219
This commit is contained in:
Ole Laursen 2012-03-24 16:52:54 +00:00
parent fc921ecb72
commit 0fea5e015a
3 changed files with 5 additions and 5 deletions

View file

@ -121,7 +121,7 @@ def document_main(request, name, rev=None):
if doc.type_id == "charter":
filename = doc.name + "-" + doc.rev + ".txt"
filename = "%s-%s.txt" % (doc.canonical_name(), doc.rev)
content = _get_html(filename, os.path.join(settings.CHARTER_PATH, filename), split=False)

View file

@ -37,7 +37,7 @@ def default_action_text(wg, charter, user, action):
info['list_subscribe'] = str(wg.list_subscribe) if wg.list_subscribe else None,
info['list_archive'] = str(wg.list_archive) if wg.list_archive else None,
filename = os.path.join(settings.CHARTER_PATH, 'charter-ietf-%s-%s.txt' % (wg.acronym, wg.charter.rev))
filename = os.path.join(settings.CHARTER_PATH, '%s-%s.txt' % (wg.charter.canonical_name(), wg.charter.rev))
try:
charter_text = open(filename, 'r')
info['charter_txt'] = charter_text.read()
@ -70,7 +70,7 @@ def default_review_text(wg, charter, user):
info['bydate'] = (date.today() + timedelta(weeks=1)).isoformat()
filename = os.path.join(settings.CHARTER_PATH, 'charter-ietf-%s-%s.txt' % (wg.acronym, wg.charter.rev))
filename = os.path.join(settings.CHARTER_PATH, '%s-%s.txt' % (wg.charter.canonical_name(), wg.charter.rev))
try:
charter_text = open(filename, 'r')
info['charter_txt'] = charter_text.read()

View file

@ -139,8 +139,8 @@ def edit(request, acronym=None, action="edit"):
save_document_in_history(c)
# and add a DocAlias
DocAlias.objects.create(
name = "charter-ietf-%s" % r['acronym'],
document = charter
name="charter-ietf-%s" % r['acronym'],
document=charter,
)
# update the attributes, keeping track of what we're doing