This is perhaps too flashy, but it does successfully animate the
progress bar up to the target amount, and also changes the amount until
it reaches the total raised so far.
The urls.py is of course only evaluated once: at Apache load time, which
means the data in the template became stale and is not dynamic.
This change should cause the lookup to happen at each page view.
Now that I'm updating the database out of band with information about
the fundraiser, I've found that the page does not properly update.
This change will hopefully fix the issue.
The progressbar is generated by Javascript. As such, the text here
won't have a progressbar formatted around it when the browser doesn't
support Javascript.
However, since the Javascript does update the text, we can format the
Django template to put in place text that we wish will appear when no
Javascript is turned on, and then allow the Javascript to make it right
when it's available.
Graceful degradation: I may be its last proponent.
The npoacct campaign was launched before the Supporter program, and
parts of its functionality were incorporated into supporter-page.js
ultimately. This commit hopefully now backports that functionality to
npoacct campaign.
This seems to be the best approach to pass a fundraising goal record to
a template. While the static hack that tmarble implemented probably
needs work anyway, this is probably the best way currently to interface
certain general data that we seek to place on many different pages
through the templates.
I looked into a templatetags solution, but this seemed more
straightforward and more fitting with Django principles (I think :).
While I think these relative imports seem to be valid for the running
application, I am having trouble with the django-admin applications
regarding them. I don't see this syntactic sugar as absolutely
essential, so I'm just going to change it now.
This simple application will simply store the code name and the to goal
of each fundraiser. The so_far number will likely just be updated by
some external script, modifying the appropriate entry in the SQL
database.