Commit graph

18 commits

Author SHA1 Message Date
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
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
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
02d97d1a72 Additional feed_dict deprecation issue.
This use of feed_dict was not properly corrected when changes were made
due to feed_dict deprecation.
2015-03-31 08:43:13 -07:00
Bradley M. Kuhn
835d482604 No longer "stash" the GET object in self.
I don't think this was actually necessary ultimately.  I think the older
code, herein removed, in item_author_email() was wrong-headed in the
first place, or at the very least, was overkill.

Each item has a distinct author, according to the BlogEntry model.  So,
I think this is actually what we want.  I noticed the author filed isn't
properly going into the RSS at the moment anyway, but I'm somewhat past
caring about that, as long as the URLs now work to get author- and tag-
specific feeds.
2014-07-14 14:39:10 -04:00
Bradley M. Kuhn
387275c9d4 GET object is accessible everywhere in BlogFeed.
This solution is likely a hack to ensure the GET object is regularly
accessible.
2014-07-14 13:10:23 -04:00
Bradley M. Kuhn
e75642ed47 use get_object() in BlogFeed to get request object
Upon reading
https://docs.djangoproject.com/en/dev/ref/contrib/syndication/#a-complex-example

I think that this is what I need to do to forward-port this Django 1.2
to Django 1.4's Feed objects.
2014-07-14 12:35:08 -04:00
Bradley M. Kuhn
252f29af81 Make sure return values match title.
I received this error from the feeds:

AttributeError at /feeds/news/

'PressRelease' object has no attribute 'title'

Request Method: 	GET
Request URL: 	http://sfconservancy.org/feeds/news/
Django Version: 	1.4.5
Exception Type: 	AttributeError

'PressRelease' object has no attribute 'title'
Exception Location: 	/var/www/conservancy/feeds.py in item_title, line 46

I think this change fixes that.
2014-07-14 11:56:30 -04:00
Bradley M. Kuhn
61476fdb5c First attempt to follow Django 1.4 feed classes.
I followed the instructions at
https://docs.djangoproject.com/en/1.4/ref/contrib/syndication/
and attempted to get these feeds to match that one.
2014-07-14 11:03:54 -04:00
Bradley M. Kuhn
2c63f6b33e Try putting these settings in each class.
I am not sure what the loop was for anyway.
2014-07-14 10:54:25 -04:00
Bradley M. Kuhn
18addfe969 Additional issues deal with feed_dict deprecation. 2014-07-14 10:52:41 -04:00
Bradley M. Kuhn
6a2918c288 In Django 1.2, feed_dict was deprecated.
Therefore, change this to use the method explained at:

https://docs.djangoproject.com/en/dev/releases/1.2/#feed-in-django-contrib-syndication-feeds
2014-07-14 10:49:29 -04:00
Bradley M. Kuhn
85e9253eec Update for Djnango 1.4.5: feeds import. 2014-07-08 13:25:48 -04:00
Bradley M. Kuhn
1032f1d75f sfconservancy.org now has an SSL certificate; make site HTTPS-Everywhere compatible.
Change all links when possible to not mention a site, so HTTPS will be used
automatically for same-site links.

For embedded images, and other links out to the rest of the world, use HTTPS
when the site is known to support it.
2013-04-26 12:48:19 -04:00
Bradley M. Kuhn
3c3de3e61b Link to news page; not perfect but better than other options. 2011-06-13 17:24:42 -04:00
Bradley M. Kuhn
28e3f83841 Got Blog working; Fixed feeds added content to front page; switch blog template style. 2010-10-04 12:15:53 -04:00
Bradley M. Kuhn
12780197e5 Adapted Django application stuff for Conservancy; and normalized to string
"conservancy" within code and templates.
2010-09-26 17:56:29 -04:00
Bradley M. Kuhn
c858e825c0 Conservancy website as it currently looks; unfortunately, old history before this cannot easily be retrieved 2010-09-26 17:20:05 -04:00