hilbert/decorators.py
def secure(view_func):
    """Handles SSL redirect on the view level."""

    @wraps(view_func, assigned=available_attrs(view_func))
    def _wrapped_view(request, *args, **kwargs):
        if not request.is_secure():
            redirect = _redirect(request, True)
            if redirect:
                # Redirect might be None if SSL is not enabled
                return redirect
        return view_func(request, *args, **kwargs)
    return _wrapped_view
Handles SSL redirect on the view level.
Handles SSL redirect on the view level.
Handles SSL redirect on the view level .
def secure(view_func):
    @wraps(view_func, assigned=available_attrs(view_func))
    def _wrapped_view(request, *args, **kwargs):
        if not request.is_secure():
            redirect = _redirect(request, True)
            if redirect:
                return redirect
        return view_func(request, *args, **kwargs)
    return _wrapped_view
def secure ( view_func ) : @ wraps ( view_func , assigned = available_attrs ( view_func ) ) def _wrapped_view ( request , * args , ** kwargs ) : if not request . is_secure ( ) : redirect = _redirect ( request , True ) if redirect : return redirect return view_func ( request , * args , ** kwargs ) return _wrapped_view
Handles SSL redirect on the view level.
Handles SSL redirect on the view level .
"""Handles SSL redirect on the view level.""" # Redirect might be None if SSL is not enabled
view_func