File diff e1dfd65c3a6e → 5c4cc1e2e114
www/conservancy/local_context_processors.py
Show inline comments
 
new file 100644
 
from conservancy.apps.fundgoal.models import FundraisingGoal as FundraisingGoal
 

	
 
def fundgoal_lookup(fundraiser_sought):
 
    try:
 
        return FundraisingGoal.objects.get(fundraiser_code_name=fundraiser_sought)
 
    except FundraisingGoal.DoesNotExist:
 
        # we have no object!  do something
 
        return None
 

	
 
def sitefundraiser(request):
 
    return {'sitefundgoal': fundgoal_lookup('supporterrun') }