Commit graph

16 commits

Author SHA1 Message Date
Bradley M. Kuhn
5c4cc1e2e1 Add sitefundgoal to top level view context.
The base template now has access to the fund-raising goal that will be
displayed site-wide.  The view here must provide it in the context for
access everywhere.

Furthermore, we need a local context processor to make sure it's in
context everywhere, and we have to make sure that context is properly
passed along.

This code is a bit cargo-culted in, based on what I read in various
places about adding the Request context.
2015-11-30 19:19:46 -08:00
Bradley M. Kuhn
30b1a3d23d Correct attr in lookup as well. 2015-05-09 17:34:49 -07:00
Bradley M. Kuhn
97ab9c7541 Correct lookup of attribute. 2015-05-09 17:33:51 -07:00
Bradley M. Kuhn
4d4f520900 Correct keys to be the code name of the fundraiser 2015-05-09 17:31:47 -07:00
Bradley M. Kuhn
8df76219f8 Get an empty dict & no error when attrs not there 2015-05-09 17:29:08 -07:00
Bradley M. Kuhn
87a658a6b6 correct variable name. 2015-05-09 17:25:25 -07:00
Bradley M. Kuhn
9dab283774 Generate JSON output of a fundraiser data
Allow public interface to query the fundraiser data.
2015-05-09 16:50:32 -07:00
Bradley M. Kuhn
8b469cff18 Support display of donation count in fundraiser.
Allow display of a donation count in the fundraiser pages, with an
optional threshold that must be met before it's displayed.
2015-03-11 18:10:28 -07:00
Bradley M. Kuhn
db4a82f432 Correct goal amount for admin display. 2015-03-08 23:00:32 -07:00
Bradley M. Kuhn
8888a12699 Import decimal needed. 2015-03-08 21:28:44 -07:00
Bradley M. Kuhn
65142c984a Convert 100.00 to Decimal for operation. 2015-03-08 21:27:13 -07:00
Bradley M. Kuhn
637dd98a68 self. was needed here. 2015-03-08 21:24:09 -07:00
Bradley M. Kuhn
027964192a Function to compute how far to the goal we are.
This is also inserted by the Javascript code as well, but no reason we
can't compute it server side, too.
2015-03-08 21:21:58 -07:00
Bradley M. Kuhn
0d2908ef30 Add empty __init__.py for fundgoal. 2015-03-08 18:18:46 -07:00
Bradley M. Kuhn
f6bbcc7ee3 Just quit it with this relative import stuff.
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.
2015-03-08 17:54:05 -07:00
Bradley M. Kuhn
d73018440a Initial hack at a fundraising goal application.
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.
2015-03-08 17:40:24 -07:00