Files @ ba0df40639d9
Branch filter:

Location: website/www/conservancy/local_context_processors.py

brett
supporter: Improve amount validation JavaScript.

* Check validity on page load and store it in a data attribute so we can
change validity state more accurately.
* Clear invalid state on any change.
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') }