bpssl 1.0.3

SSL/HTTPS for Django

bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page.

Specifying views and urls as secure is supported as are flatpages. Fastcgi and HTTP proxy setups are also well supported. See the documentation at:

bpssl draws inspiration from the well known SSL Middleware snippets on djangosnippets.org. It roughly supports the features of the following snippets:

Please file bugs at: http://bitbucket.org/beproud/bpssl/issues/


bpssl provides an SSLRedirectMiddleware which can redirect users from secure pages to non-secure pages and visa-versa. Urls are set up by adding regular expressions to the SSL_URLS setting in settings.py. SSLRedirectMiddleware can also be extended to support more specific use cases.

ssl_view decorator

bpssl provides an ssl_view() decorator which can be used instead of the SSL_URLS to specify that a particular view should be secure.


Generally you will want to develop bpssl in a virtualenv with pip:

$ mkvirtualenv bpssl

You can install the requirements using the requirements.txt and pip:

$ pip install -r setup/requirements.txt

And run tests normally using setup.py:

$ python setup.py test



  • Support for tests running up to Django 1.7 and Python 3.4


  • Fixed issue with get_host() function in Django 1.5


  • Fixed SSL_REQUEST_HEADER setting to use the custom setting, if available (Thanks Gabriel Grant)


  • Initial Release


Ian Lewis




  • Development Status :: 5 - Production/Stable
  • Environment :: Web Environment
  • Framework :: Django
  • Intended Audience :: Developers
  • Operating System :: OS Independent
  • Programming Language :: Python
  • Programming Language :: Python :: 3
  • License :: OSI Approved :: BSD License
  • Topic :: Software Development :: Libraries :: Python Modules
  • Environment :: Plugins
File Type Python Version Uploaded On Downloads
bpssl-1.0.3.tar.gz Source Nov. 27, 2014 1,870
Version Release Date
1.0.3 Nov. 27, 2014
1.0.2 Oct. 26, 2012
1.0.1 June 30, 2011
1.0 Nov. 9, 2010
Date Package Version Action
Aug. 24, 2015, 10:41 p.m. bpssl 1.0.3 Release Created
Aug. 24, 2015, 10:41 p.m. bpssl 1.0.2 Release Created
Aug. 24, 2015, 10:41 p.m. bpssl 1.0.1 Release Created
Aug. 24, 2015, 10:41 p.m. bpssl 1.0 Release Created
Aug. 24, 2015, 10:41 p.m. bpssl Package Created