Bug fixes from Martin Qvist

- Legacy-Id: 3167
This commit is contained in:
Ole Laursen 2011-06-03 13:59:55 +00:00
parent 52b57f182b
commit 893471df68
3 changed files with 4 additions and 2 deletions

View file

@ -507,7 +507,7 @@ def all(request):
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
active = (dict(filename=n) for n in InternetDraft.objects.filter(state="active").order_by("name").values_list('name', flat=True))
rfc1 = (dict(filename=d, rfc_number=int(n[3:])) for d, n in DocAlias.objects.filter(document__state="rfc", name__startswith="rfc").exclude(document__name__startswith="rfc").order_by("document__name").values_list('document__name','name').distinct())
rfc2 = (dict(rfc_number=r, draft=None) for r in sorted(int(n[3:]) for n in Document.objects.filter(name__startswith="rfc").values_list('name', flat=True)))
rfc2 = (dict(rfc_number=r, draft=None) for r in sorted(int(n[3:]) for n in Document.objects.filter(type="draft", name__startswith="rfc").values_list('name', flat=True)))
dead = InternetDraft.objects.exclude(state__in=("active", "rfc")).select_related("state").order_by("name")
else:
active = InternetDraft.objects.all().filter(status=1).order_by("filename").values('filename')

View file

@ -16,7 +16,7 @@ class InternetDraft(Document):
job_owner="ad",
rfc_number=lambda v: ("docalias__name", "rfc%s" % v),
cur_state="iesg_state__order",
))
), always_filter=dict(type="draft"))
DAYS_TO_EXPIRE=185

View file

@ -173,6 +173,8 @@ class IETFWG(Group):
# def drafts(self): # return a set of Rfc objects for this group
# return InternetDraft.objects.filter(group__exact=self.group_acronym)
def charter_text(self): # return string containing WG description read from file
import os
from django.conf import settings
# get file path from settings. Syntesize file name from path, acronym, and suffix
try:
filename = os.path.join(settings.IETFWG_DESCRIPTIONS_PATH, self.acronym) + ".desc.txt"