Changeset - ecff2f38c5ea
[Not reviewed]
0 2 0
Brett Smith (brett) - 15 months ago 2019-11-24 21:01:57
brett@sfconservancy.org
base_conservancy: Ready fundraiser bar for 2019.
2 files changed with 13 insertions and 7 deletions:
0 comments (0 inline, 0 general)
www/conservancy/local_context_processors.py
Show inline comments
...
 
@@ -4,11 +4,12 @@ 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):
www/conservancy/templates/base_conservancy.html
Show inline comments
...
 
@@ -54,7 +54,8 @@
 
  * fundraiser_goal_amount: The amount being matched
 
  * fundraiser_so_far_amount: The amount contributed so far
 
  * fundraiser_donation_count: The number of people who have contributed so far
 
  * fundraiser_donation_count_disclose_threshold: Not used
 
  * fundraiser_donation_count_disclose_threshold: The number of new Supporters that can be double-matched this fundraiser.
 
      (No, this name makes no sense. We're repurposing an existing model field for this new reason.)
 
* sitefundgoal_endtime: DateTime when sitefundgoal ends.
 

	
 
## Local convenience variables
...
 
@@ -66,8 +67,7 @@
 

	
 
{% endcomment %}
 

	
 
{% comment %}
 
{% if sitefundgoal %}
 
{% if sitefundgoal and sitefundgoal.fundraiser_so_far_amount and datetime_now < sitefundgoal_endtime %}
 
{% with this_match_goal=sitefundgoal.fundraiser_goal_amount this_match_so_far=sitefundgoal.fundraiser_so_far_amount %}
 
{% with this_match_remaining=this_match_goal|subtract:this_match_so_far sitefundgoal_timeleft=sitefundgoal_endtime|subtract:datetime_now %}
 
    <div class="fundraiser-top-text">
...
 
@@ -87,7 +87,13 @@
 
          {% else %}
 
            The
 
          {% endif %}
 
        next ${{ this_match_remaining|floatformat:0|intcomma }} of support we receive will be matched thanks to Private Internet Access and a group of generous donors, including {{ sitefundgoal.random_providers }}!  <a href="/supporter/">Support Conservancy today!</a>
 
        next ${{ this_match_remaining|floatformat:0|intcomma }} of support we receive will be matched thanks to Private Internet Access and a group of generous donors, including {{ sitefundgoal.random_providers }}!
 

	
 
        {% if sitefundgoal.fundraiser_donation_count_disclose_threshold > 0 %}
 
          The next {{ sitefundgoal.fundraiser_donation_count_disclose_threshold|intcomma }} new Supporters will even have their donations tripled!
 
        {% endif %}
 

	
 
        <a href="/supporter/">Support Conservancy today!</a>
 
        {% endif %}
 
      </p>
 

	
...
 
@@ -111,7 +117,6 @@
 
{% endwith %}
 
{% endwith %}
 
{% endif %}
 
{% endcomment %}
 

	
 
      {% block outercontent %}<div id="mainContent"> {% block content %}{% endblock %}</div>{% endblock %}
 
    <div id="conservancyfooter">
0 comments (0 inline, 0 general)