Changeset - 8ea3438885fc
[Not reviewed]
0 3 1
Brett Smith (brett) - 6 months ago 2020-11-24 13:54:02
brett@sfconservancy.org
supporter: Kick off 2020 fundraiser. RT#12984

Image is copyright Remy DeCausemaker and licensed under CC BY-SA 4.0.
1 file changed:
Changeset was too big and was cut off... Show full diff anyway
0 comments (0 inline, 0 general)
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 = 'cy2019-end-year-match'
 
SITE_FUNDGOAL = 'cy2020-end-year-match'
 
# FIXME: Move this information into the model.
 
FUNDGOAL_ENDTIMES = {
 
    # 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),
 
    'cy2020-end-year-match': DateTime(2021, 1, 16, 12, tzinfo=UTC),
 
}
 

	
 
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 {
 
        'datetime_now': DateTime.now(UTC),

Changeset was too big and was cut off... Show full diff anyway

0 comments (0 inline, 0 general)