示例#1
0
def update(request):
    feed = eval("request." + request.method + "['feed']")
    try:
        feed = Feed.objects.get(id=feed)
    except Feed.DoesNotExist:
        return HttpResponseRedirect('/feeds')
    update_feeds(feed)
    return HttpResponseRedirect('/feeds')
示例#2
0
def update(request, id):
    try:
        feed = Feed.objects.get(id=id)
    except Feed.DoesNotExist:
        return HttpResponseRedirect('/reader/')

    update_feeds(feed)

    cache.delete('ar')

    if request.is_ajax():
        return HttpResponse('%s yay!' % id)
    return HttpResponseRedirect('/reader/')
示例#3
0
def update_all(request):
    for feed in Feed.objects.filter(user=request.user):
        update_feeds(feed)
    return HttpResponseRedirect('/')