File diff e7f21fa2533d → ffa2889acb73
conservancy/podjango/views.py
Show inline comments
...
 
@@ -15,22 +15,23 @@
 
# You should have received a copy of the GNU Affero General Public License
 
# along with this program in a file in the toplevel directory called
 
# "AGPLv3".  If not, see <http://www.gnu.org/licenses/>.
 
#
 
from datetime import datetime
 
from functools import reduce
 
from operator import or_
 

	
 
from django.shortcuts import get_object_or_404, render
 
from django.views.generic.list import ListView
 

	
 
from .models import Cast, CastTag
 

	
 

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

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

	
 
def custom_index(request, queryset, *args, **kwargs):