@login_required
def search_history(request):

    # If the user is Anonymous, redirect them to the login view.
    if not type(request.user._wrapped) is User:
        return HttpResponseRedirect(reverse('login'))

    template = loader.get_template('isisdata/search_history.html')
    searchqueries = request.user.searches.order_by('-created_on')

    paginator = Paginator(searchqueries, 10)

    page = request.GET.get('page')
    try:
        searchqueries = paginator.page(page)
    except PageNotAnInteger:
        # If page is not an integer, deliver first page.
        searchqueries = paginator.page(1)
    except EmptyPage:
        # If page is out of range (e.g. 9999), deliver last page of results.
        searchqueries = paginator.page(paginator.num_pages)

    context = RequestContext(request, {
        'searchqueries': searchqueries,
    })
    return HttpResponse(template.render(context))
Clear the dynamic access token.
dataset/ETHPy150Open upconsulting/IsisCB/isiscb/isisdata/views.py/search_history--crossover with--dataset/ETHPy150Open django-salesforce/django-salesforce/salesforce/auth.py/SalesforceAuth.dynamic_end