File diff bdac443c16db → ecff2f38c5ea
www/conservancy/local_context_processors.py
Show inline comments
 
from datetime import datetime as DateTime
 
from pytz import utc as UTC
 

	
 
import conservancy.settings
 
from conservancy.apps.fundgoal.models import FundraisingGoal as FundraisingGoal
 

	
 
SITE_FUNDGOAL = 'cy2018-end-year-match'
 
SITE_FUNDGOAL = 'cy2019-end-year-match'
 
# FIXME: Move this information into the model.
 
FUNDGOAL_ENDTIMES = {
 
    # End of 2019-01-15 AOE is 2019-01-16 noon UTC.
 
    # Noon UTC = the end of the previous day anywhere on Earth (AOE)
 
    'cy2018-end-year-match': DateTime(2019, 1, 16, 12, tzinfo=UTC),
 
    'cy2019-end-year-match': DateTime(2020, 1, 16, 12, tzinfo=UTC),
 
}
 

	
 
def fundgoal_lookup(fundraiser_sought):
 
    try:
 
        return FundraisingGoal.objects.get(fundraiser_code_name=fundraiser_sought)
 
    except FundraisingGoal.DoesNotExist: