Split big 'if' in get_context_data into a couple of classes.

get_context_data on SAOrganisationDetailSub was getting rather iffy.
Shift sub_page to view initialisation arguments.

We were always setting 'sub_page' in the extra arguments passed
as if they had been found in the URL. Instead of setting it here
every time a url is accessed, let's set it at setting up urls
time in the kwargs of as_view. This means that we can then
access all of those things directly as attributes of the view
rather than as values in self.kwargs, and it also means that
we can set class a class attribute of sub_page in subclasses
rather than doing it in the urls.py file, allowing the splitting
of, for instance SAPersonDetailSub into subclasses.
Whitespace tidy
Sort positions differently so that they are grouped by person.

Sort positions by triples of

(surname, person_id, is it membership of a parliament)

in order to make sure that all positions of the same person appear
together and that parliamentary membership appears first for a person.
Reduce the font size used in body text of blog posts

As requested by Paul Lenz in issue #1347
Don't check slugs in the File model of pombola.file_archive

The slugs for uploaded files can be chosen by the person who uploads it,
and doesn't seem to be important that these filename don't contain
capital letters, for example.  We're getting a lot of emails complaining
about these slugs, so just remove this model from the list that are checked
in core_list_malformed_slugs.

This seems like a better fix for the actual problem described in #1304
(irritating cron emails) than the alternative approach in the
issues/1304-possible-fix branch, which tries to fix them and prevent
people from creating such slugs in the future.
Merge remote-tracking branch 'origin/issues/1336-duplicate-users'
Fix the stubbing of the geocoder in tests of views

The previous attempt to stub the geocoder from tests of the search
views didn't work at all - i.e. it still was calling the Google API.
This commit fixes that.
Update expected HTML output from pdftohtml for version 0.18.4

This means:

 * updating the <HEAD> element
 * replacing &nbsp; with &#160;
 * replacing <br> with <br/>
kenya_parser: Throw a more helpful exception if a venue isn't found
Politician positions must be marked with category='political'

This fixes some long-standing test failures which weren't very
visible because people typically don't have KENYA_PARSER_PDF_TO_HTML_HOST
set.
Update the expected version of pdftohtml to 0.18.4

This is from the poppler-utils package; our servers are now on wheezy
which has version 0.18.4 - this is also the version in Ubuntu precise.
Revert "Use fallback urls for new KE hansard sources, produce warning if old site comes back. Closes #905"

This reverts commit 9de6afc1a8243263e208d28d6c8392e62fd362e6.

This is no longer needed; the original pages are working again.
Revert a change that shouldn't have been introduced

This was an error that was picked up in review and pointed out, but
still got merged somehow.
Revert a change that shouldn't have been introduced

This was an error that was picked up in review and pointed out, but
still got merged somehow.
KE Hansard: Ignore (and issue a warning) for mising 'download' DIVs
KE Hansard: output the filename that failed for PDF parsing errors
Merge remote-tracking branch 'fix-pdftohtml-version-mismatch'
hansard: remove duplicate people from name matches

A Person can appear more the once in the results of this query, so
add a .distinct() to improve the chances of getting a unique match.
Remove a now unused 401 page with mailing list signup