from django.shortcuts import redirect
from django.contrib.auth.models import User


def unauthenticated_user(view_func):

    def wrapper_func1(request, *args, **kwargs):
        if request.user.is_authenticated:
            return view_func(request, *args, **kwargs)
        else:
            return redirect('cricket_application:login')
    return wrapper_func1

6dc61614fa1209be4597827b037da9ebd3b97f9f
<mask token>

<mask token>


def unauthenticated_user(view_func):

    def wrapper_func1(request, *args, **kwargs):
        if request.user.is_authenticated:
            return view_func(request, *args, **kwargs)
        else:
            return redirect('cricket_application:login')
    return wrapper_func1

from django.shortcuts import redirect
from django.contrib.auth.models import User


def unauthenticated_user(view_func):

    def wrapper_func1(request, *args, **kwargs):
        if request.user.is_authenticated:
            return view_func(request, *args, **kwargs)
        else:
            return redirect('cricket_application:login')
    return wrapper_func1
