Ejemplo n.º 1
0
def _feed_test(prooftexts):
    feed = AtomFeed(app.config['SITE_TITLE'],
                    author=app.config['SITE_TITLE'],
                    feed_url=request.url,
                    url=request.url_root)
    now = dt.datetime.now(tz=pytz.timezone(app.config['TZ']))
    for date in (now - dt.timedelta(n) for n in range(30)):
        month = date.strftime('%m')
        day = date.strftime('%d')
        content = data.get_day(str(date.month), str(date.day), prooftexts=prooftexts)
        page_title = data.get_day_title(month, day)
        url = "http://{}/westminster-daily/{}/{}".format(request.host, month, day)

        feed.add(page_title,
                 render_daily_page(month, day, content,
                                   template='feed_item_t.html',
                                   url=url),
                 content_type='html',
                 url=url,
                 published=date,
                 updated=date)
    return feed
Ejemplo n.º 2
0
def render_image_page(month, day):
    content = data.get_day(month, day, prooftexts=False)
    return render_daily_page(month, day, content, template='image_t.html')
Ejemplo n.º 3
0
def render_fixed_day(month, day):
    content = data.get_day(month, day, prooftexts=show_prooftexts())
    return render_daily_page(month, day, content, static=True)
Ejemplo n.º 4
0
def render_test(month, day):
    content = data.get_day(month, day, prooftexts=True)
    return render_daily_page(month, day, content, template='feed_item_t.html')