from django.http import HttpResponseRedirect


def requireLogin(func):

    def wrapper(request, *args, **kwargs):
        if not request.user.is_authenticated():
            return HttpResponseRedirect('/login')
        return func(request, *args, **kwargs)
    return wrapper

08f56028f353560eddeccbe04b467fecc6ac259d
<mask token>

<mask token>


def requireLogin(func):

    def wrapper(request, *args, **kwargs):
        if not request.user.is_authenticated():
            return HttpResponseRedirect('/login')
        return func(request, *args, **kwargs)
    return wrapper

from django.http import HttpResponseRedirect


def requireLogin(func):

    def wrapper(request, *args, **kwargs):
        if not request.user.is_authenticated():
            return HttpResponseRedirect('/login')
        return func(request, *args, **kwargs)
    return wrapper
