From 810deb19151cd23c1e553cb2a6a9fb2e7ac6fff9 Mon Sep 17 00:00:00 2001 From: Ross Bruniges Date: Fri, 5 Apr 2013 11:46:03 +0100 Subject: [PATCH] Fix broken logic and a quick test hack --- apps/challenges/models.py | 4 ++++ apps/ignite/templates/ignite/about.html | 9 +++++++-- apps/ignite/templates/ignite/splash.html | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/challenges/models.py b/apps/challenges/models.py index 1b68884..19d84eb 100644 --- a/apps/challenges/models.py +++ b/apps/challenges/models.py @@ -143,6 +143,10 @@ def get_absolute_url(self): slug = 'ideas' if self.is_ideation else 'apps' return ('entries_all', [slug]) + @cached_property + def hacked_PST_enddate(self): + return self.end_date - relativedelta(hours=8) + @cached_property def days_remaining(self): now = datetime.utcnow() diff --git a/apps/ignite/templates/ignite/about.html b/apps/ignite/templates/ignite/about.html index 2660476..71edef6 100644 --- a/apps/ignite/templates/ignite/about.html +++ b/apps/ignite/templates/ignite/about.html @@ -25,10 +25,15 @@

What is the Mozilla Ignite Challenge?

{% if request.development.is_open %}

Now through {{ request.development.current_round.end_date.strftime('%B %-d') }}: submit your app proposals or further develop your existing application.

+

Time to start hacking: we're offering $485,000 in prizes & support for teams over three rounds.

{% else %} -

{{ request.development.next_round.start_date.strftime('%B %-d') }} through {{ request.development.next_round.end_date.strftime('%B %-d') }}: submit your app proposals or further develop your existing application.

+ {% if development.next_round %} +

{{ request.development.next_round.start_date.strftime('%B %-d') }} through {{ request.development.next_round.end_date.strftime('%B %-d') }}: submit your app proposals or further develop your existing application.

+

Time to start hacking: we're offering $485,000 in prizes & support for teams over three rounds.

+ {% else %} +

We're currently judging the last round, we'll soon be announcing the final winners.

+ {% endif %} {% endif %} -

Time to start hacking: we're offering $485,000 in prizes & support for teams over three rounds.

{% if request.ideation.is_open %} Submit your idea now {% endif %} diff --git a/apps/ignite/templates/ignite/splash.html b/apps/ignite/templates/ignite/splash.html index dfd803a..5edce00 100644 --- a/apps/ignite/templates/ignite/splash.html +++ b/apps/ignite/templates/ignite/splash.html @@ -28,6 +28,7 @@

{% if development.is_open %} Apply now
Apply by {{ request.development.current_round.end_date.strftime('%B %-d') }} to compete in this round + Apply by {{ request.development.current_round.hacked_PST_enddate.strftime('%B %-d') }} to compete in this round {% else %} {% if development.has_started %} We're currently judging the last round, we'll soon be announcing the final winners.