def index_list(echo, year): allstart() ea = '%s.%s' % (echo, year) if not flt.echo_flt(ea): return ea cfg = api.load_echo(True) local.r.update(page_title=ea, echolist=cfg[1:], ea=ea) return template('iitpl/echoarea.html', r=local.r, j=api.get_echoarea_f(ea))
def index_list(echo,year): allstart() ea = '%s.%s' % (echo,year) if not flt.echo_flt(ea): return ea elist = api.load_echo(True) local.r.update(page_title=ea,echolist=elist,ea=ea) return template('iitpl/echoarea.html',r=local.r,j=api.get_echoarea_f(ea))
def gen_rss(ea,url,num): if not flt.echo_flt(ea): return ea msgs = [api.get_msg(n) + {'msgid': n} for n in reversed(api.get_echoarea_f(ea)[-num:])] items = [PyRSS2Gen.RSSItem( title=n.subj,description=sx.rend(n.msg),link='http://%s/%s#%s' % (url,ea,n.msgid), guid='http://%s/%s#%s' % (url,ea,n.msgid), pubDate=datetime.datetime.fromtimestamp(n.date) ) for n in msgs ] rssout = PyRSS2Gen.RSS2(title=ea,link='http://%s/%s' % (url,ea),description='Echoarea: %s' % ea, lastBuildDate=datetime.datetime.now(),items=items) return rssout.to_xml('utf-8')
def start_page(): allstart() cfg = api.load_echo(True) if local.r.kuk.myel: myel = [e for e in local.r.kuk.myel.splitlines() if flt.echo_flt(e)] else: myel = [] if not myel: myel = cfg[1:] else: myel = api.separate_myel(myel, cfg[1:]) #print myel lst = [(e, api.get_echoarea_f(e)) for e, c, d in myel] local.r.page_title = u'ii : всё для хорошего общения' return template('iitpl/index.html', r=local.r, lst=lst)
def start_page(): allstart() cfg = config(CONFIG) lst=[(e,api.get_echoarea_f(e)) for e in cfg['areas'].keys()] local.r.page_title = u'ii : ваше домашнее фидо' return template('iitpl/index.html',r=local.r,lst=lst)
def start_page(): allstart() cfg = api.load_echo(True) lst=[(e,api.get_echoarea_f(e)) for e,c,d in cfg[1:]] local.r.page_title = u'ii : ваше домашнее фидо' return template('iitpl/index.html',r=local.r,lst=lst)
def start_page(): allstart() cfg = config(CONFIG) lst = [(e, api.get_echoarea_f(e)) for e in cfg['areas'].keys()] local.r.page_title = u'ii : ваше домашнее фидо' return template('iitpl/index.html', r=local.r, lst=lst)