SSL Decorator
Wrote this some time ago when I couldn't find one already completed. Came up in the IRC channel so I decided to post it. Easy enough to use. `from ssldecorator import ssl_required` `@ssl_required` `def your_view(request):` ` ''' your code here '''` You can place a variable in your settings.py to change the SSL domain (ie, if you have SSL running on secure.yourdomain.com instead of www.yourdomain.com).. `SSL_DOMAIN = 'https://secure.yourdomain.com'` Note: please include a proper URL. If https isn't used, the decorator will add it.
- ssl
- decorator