Commit graph

66 commits

Author SHA1 Message Date
Bradley M. Kuhn
c564f15511 Correct & update hard-coded domain names from legacy codebase. 2020-01-24 09:26:59 -08:00
Brett Smith
f23020f384 supporter banners: New page. 2018-12-17 16:15:11 -05:00
Brett Smith
4fd27245d6 fundgoal: Add provider convenience methods to FundraisingGoal. 2018-11-18 14:42:47 -05:00
Brett Smith
2461bc19b1 fundgoal: Remove unnecessary import. 2018-11-18 14:39:18 -05:00
Brett Smith
621ace8488 fundgoal: Add goal providers. 2018-11-18 14:39:18 -05:00
Brett Smith
e952e2b26a fundgoal: Start supporting migrations. 2018-11-18 14:39:18 -05:00
Brett Smith
3b2ed8397d blog/news: Add Open Graph metadata to entry pages.
This helps other social media sites generate nice previews for these pages.
2017-11-07 11:17:33 -05:00
Brett Smith
87961c6cee templatetags: Add fill_url.
This gives templates an easy way to generate full URLs using host_url.
2017-11-07 10:13:48 -05:00
Brett Smith
66dbfac066 Migrate RequestContext users to render() calls.
This was necessary because render_to_response no longer takes a
context_instance.  We were always using this to pass in a RequestContext,
which the render shortcut can already do, so switch to that.
2017-11-07 09:00:48 -05:00
Brett Smith
b2a006f49c urls: Migrate from patterns strings to plain lists of urls. 2017-11-07 09:00:48 -05:00
Brett Smith
0160f03c25 blog: Remove unnecessary kwargs manipulation from custom_index.
I don't know if this code is left over from previous versions or what, but
it's not doing anything now.  custom_index doesn't pass kwargs to anything
else, so there's no need to fiddle with the dict so much.
2017-02-03 11:02:33 -05:00
Brett Smith
8115cb27e2 blog: Fix variable name typo in views code. 2017-02-03 10:31:51 -05:00
Brett Smith
ce1b4b2528 Remove noop conservancy.context_processors imports.
You'll note this source doesn't exist in Git.
There's a reason for that.
2016-12-02 22:21:40 -05:00
Brett Smith
501b4b05fc supporter: Fix format string syntax error. 2016-12-02 15:15:49 -05:00
Brett Smith
4fa0f8343c supporter: Use proper float formatting for parameter validation. 2016-12-02 15:07:35 -05:00
Brett Smith
6fe13959a3 supporter: Support donors upgrading to supporters.
With a valid URL, a past donor can upgrade to a supporter by donating
the rest of the amount.  Django validates the data and, if it passes,
puts it in the form.  The JavaScript does most of the work from there.
2016-12-02 12:50:21 -05:00
Brett Smith
8fec6023e9 contractpatch: Add page. 2016-11-28 15:23:58 -05:00
Bradley M. Kuhn
d305f5103f Implement min filter. 2015-11-30 20:33:14 -08:00
Bradley M. Kuhn
99d3325e33 Create subtract filter. 2015-11-30 19:19:46 -08:00
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
71834b60ec Fix another typo in import correction. 2015-03-08 18:16:33 -07:00
Bradley M. Kuhn
a5cd6ab63b Make defaults for BooleanFields.
According to django-admin check,

   (1_6.W002) BooleanField does not have a default value.
    HINT: Django 1.6 changed the default value of BooleanField from False to None. See https://docs.djangoproject.com/en/1.6/ref/models/fields/#booleanfield for more information.
2015-03-08 18:00:50 -07:00
Bradley M. Kuhn
bef4637016 Fix typos in module path names from last commit. 2015-03-08 17:56:56 -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
Bradley M. Kuhn
fb16e1127d Correct to use pub_date here, not a variable. 2015-03-04 15:43:04 -08:00
Bradley M. Kuhn
c7d4309149 Fix blog by year index.
Add an additional context data that is always the entire list of years,
and use that instead of date_list for the current queryset.
2015-03-04 15:40:54 -08:00
Bradley M. Kuhn
1c6e685ee4 Remove dead code, no longer needed. 2015-03-04 15:31:05 -08:00
Bradley M. Kuhn
cdf9c67b42 Typo fix from last commit:
s/extra_content/extra_context/
2015-03-04 15:25:50 -08:00
Bradley M. Kuhn
1e396f77a3 More extra_context stuff? Put it all in there!
Simply move the blog_entries field into extra_context and pass the whole
darn thing along to the template.
2015-03-04 15:24:53 -08:00
Bradley M. Kuhn
8e6c2e54ac date_list should come from the extra_context too. 2015-03-04 15:18:18 -08:00
Bradley M. Kuhn
103ffefc87 Correct variables for setting. 2015-03-04 15:17:31 -08:00
Bradley M. Kuhn
0b530f1139 Only 4 blog entries per page. 2015-03-04 15:12:02 -08:00
Bradley M. Kuhn
1ed42c6c89 Must extract paginate_by from kwargs to use it. 2015-03-04 15:07:30 -08:00
Bradley M. Kuhn
b7316e0555 Paginator must be imported if one wants to use it. 2015-03-04 15:06:13 -08:00
Bradley M. Kuhn
8f4c8a69d6 Rework blog's custom_index for new pagination.
The pagination support changed, and as was previously done a few commits
ago for news, I'm trying a similar solution for blogs.

In this case, I'm trying to use the existing custom_index() method we
have and adapt it to properly support pagination in the way we want.

I'm not completely sure this will work, but I think it's at least close.
2015-03-04 15:04:13 -08:00
Bradley M. Kuhn
47b446cd3b Correct template path name. 2015-03-04 12:42:42 -08:00