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.
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.
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.
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.
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.