def catchup(request, group, category_id):
    if category_id == '0':
        ThreadLastVisit.objects.filter(user = request.user).delete() 
        CategoryLastVisit.objects.filter(user = request.user).update(lastvisit = datetime.today(), oldlastvisit = None)
        req = HttpResponseRedirect(sph_reverse('sphboard-index'))
    else:
        category = get_object_or_404(Category, pk = category_id )
        category.catchup(request.session, request.user)
        req = HttpResponseRedirect( sph_reverse('sphene.sphboard.views.showCategory' , kwargs = {'category_id': category_id } ) )

    req.sph_lastmodified = True
    return req
Beispiel #2
0
def catchup(request, group, category_id):
    if category_id == '0':
        ThreadLastVisit.objects.filter(user=request.user).delete()
        CategoryLastVisit.objects.filter(user=request.user).update(
            lastvisit=timezone.now(), oldlastvisit=None)
        req = HttpResponseRedirect(sph_reverse('sphboard-index'))
    else:
        category = get_object_or_404(Category, pk=category_id)
        category.catchup(request.session, request.user)
        req = HttpResponseRedirect(category.get_absolute_url())

    req.sph_lastmodified = True
    return req
Beispiel #3
0
def catchup(request, group, category_id):
    category = get_object_or_404(Category, pk = category_id )
    category.catchup(request.session, request.user)
    req = HttpResponseRedirect( '../../show/%s/' % category_id )
    req.sph_lastmodified = True
    return req
Beispiel #4
0
def catchup(request, group, category_id):
    category = get_object_or_404(Category, pk=category_id)
    category.catchup(request.session, request.user)
    req = HttpResponseRedirect('../../show/%s/' % category_id)
    req.sph_lastmodified = True
    return req