SSL Redirect Middleware and testing

1
2
3
4
5
6
7
# Create a dummy middleware class for testing, that simply removes the SSL argument
# and does nothing else.
if settings.TESTING:
    class SSLRedirect:
        def process_view(self, request, view_func, view_args, view_kwargs):
            if SSL in view_kwargs:
                del view_kwargs[SSL]

More like this

  1. SSL Redirect Middleware by zbyte64 4 years, 10 months ago
  2. SSL Middleware by sjzabel 6 years, 2 months ago
  3. Quickly check templates while sketching them out by Amr Mostafa 6 years, 1 month ago
  4. SSL / HTTPS Middleware for Redirection and href Rewriting by DrMeers 3 years ago
  5. Django model cron jobs by willhardy 4 years, 7 months ago

Comments

(Forgotten your password?)