Exemple #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')
Exemple #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/')
Exemple #3
0
def update_all(request):
    for feed in Feed.objects.filter(user=request.user):
        update_feeds(feed)
    return HttpResponseRedirect('/')