diff --git a/www/conservancy/local_context_processors.py b/www/conservancy/local_context_processors.py new file mode 100644 index 0000000000000000000000000000000000000000..5bd2556ab3bc45ece00bd8cd8e2a41081d364757 --- /dev/null +++ b/www/conservancy/local_context_processors.py @@ -0,0 +1,11 @@ +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') }