File diff d73018440a4d → f6bbcc7ee328
Show inline comments
from models import Entry, EntryTag # relative import
from import Entry, EntryTag # relative import
# from django.views.generic.list_detail import object_list
from django.views.generic import ListView
from django.views.generic.dates import YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from conservancy.apps.staff.models import Person
from django.shortcuts import get_object_or_404, render_to_response
from datetime import datetime

def OR_filter(field_name, objs):
    from django.db.models import Q
    return reduce(lambda x, y: x | y,
                  [Q(**{field_name:}) for x in objs])

def last_name(person):
    return person.formal_name.rpartition(' ')[2]

def custom_index(request, queryset, *args, **kwargs):
    """Blog list view that allows scrolling and also shows an index by

    kwargs = kwargs.copy()
    kwargs['extra_context'] = kwargs.get('extra_context', {}).copy()
    extra_context = kwargs['extra_context']