@fresh_login_required
@nocache
def reminder_history(pk_hash):
    reminder = Reminder.objects.get_or_404(pk_hash=pk_hash,
                                           owner=current_user._get_current_object())
    history = ReminderHistory.objects.filter(reminder=reminder)

    # Paginate
    try:
        history = Paginator(history, page=int(request.args.get('page', 1)))
    except (IndexError, __HOLE__):
        return redirect(url_for('user.reminders.history', pk_hash=reminder.pk_hash))

    context = {
        'title': 'Reminder History',
        'description': 'View Reminder Sent History',
        'reminder': reminder,
        'history': history
    }

    return render_template('user/reminders/history/index.html', **context)
dataset/ETHPy150Open shaunduncan/breezeminder/breezeminder/views/reminder.py/reminder_history