Example #1
0
def pastebin_rss_view(context, request):
    pastebin_url = resource_url(context, request)
    pastes = utils.get_pastes(context, request, sys.maxint)
    if pastes:
        last_date=pastes[0]['date']
    else:
        last_date=None
    for paste in pastes:
        paste['body'] = utils.nl_to_br(paste['body'])
    response = dict(
        pastes = pastes,
        last_date = last_date,
        pastebin_url = pastebin_url,
        )
    request.response_content_type = 'application/rss+xml'
    return response
Example #2
0
def tutorialbin_rss_view(context, request):
    tutorialbin_url = resource_url(context, request)
    tutorials = get_tutorials(context, request, sys.maxint)
    if tutorials:
        last_date=tutorials[0]['date']
    else:
        last_date=None
    for tutorial in tutorials:
        tutorial['text'] = nl_to_br(tutorial['text'])
    response = dict(
        tutorials = tutorials,
        last_date = last_date,
        tutorialbin_url = tutorialbin_url,
        )
    request.response_content_type = 'application/rss+xml'
    return response