How to rewrite django admin login view?

This is my custom login view where user can only login if their email verified. I also added two step verification in my login view. is there any way where I can implement this view in django admin login ?

def login_view(request):
        username = None
        password = None
        two_factor = None
        if request.method == 'POST':
                username = request.POST.get('username')
                password = request.POST.get('password')
                otp = request.POST.get('auth_code')
                user = authenticate(request, username=username, password=password)
                User = get_user_model()
                if user is not None and user.is_active:
                   user_mail = user.userprofile.filter(
                            user=user, email_confirmed=True)
                   two_factor = user.userprofile.filter(
                            user=user, two_factor=True)
                   for i in two_factor:
                   two factor code
                   if user_mail and two_factor:
                      if secret_code == otp:
                          login(request, user)

Look here: The Django admin site | Django documentation | Django

Here an example of overriding… The Django admin site | Django documentation | Django

Thanks for your suggestion. Basically I want implement my login_view in my django admin login.