File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import re
1+ import re , os
22from django .contrib .syndication .feeds import Feed
33from django .utils .feedgenerator import Atom1Feed
4+ from django .conf import settings
45from ietf .proceedings .models import WgProceedingsActivities
56from ietf .proceedings .models import Slide , WgAgenda , Proceeding
67from datetime import datetime , time
@@ -14,6 +15,21 @@ class LatestWgProceedingsActivity(Feed):
1415 base_url = "http://www3.ietf.org/proceedings/"
1516
1617 def items (self ):
18+ if settings .USE_DB_REDESIGN_PROXY_CLASSES :
19+ objs = []
20+ from redesign .doc .models import Document
21+ for doc in Document .objects .filter (type__in = ("agenda" , "minutes" , "slides" )).order_by ('-time' )[:60 ]:
22+ obj = dict (
23+ title = doc .type_id ,
24+ group_acronym = doc .name .split ("-" )[2 ],
25+ date = doc .time ,
26+ link = self .base_url + os .path .join (doc .get_file_path (), doc .external_url )[len (settings .AGENDA_PATH ):],
27+ author = ""
28+ )
29+ objs .append (obj )
30+
31+ return objs
32+
1733 objs = []
1834 for act in WgProceedingsActivities .objects .order_by ('-act_date' )[:60 ]:
1935 obj = {}
Original file line number Diff line number Diff line change @@ -185,6 +185,8 @@ def import_material_kind(kind, doctype):
185185 if kind == Slide :
186186 name += "-%s" % o .slide_num
187187
188+ name = name .lower ()
189+
188190 try :
189191 d = Document .objects .get (type = doctype , docalias__name = name )
190192 except Document .DoesNotExist :
You can’t perform that action at this time.
0 commit comments