first push

This commit is contained in:
2025-05-23 14:44:12 +08:00
commit abefd1b19b
817 changed files with 580289 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
from django.contrib.auth import authenticate
from django.contrib import messages
from django.shortcuts import redirect
def unauthenticated_user(view_func):
def wrapper(request,*args,**kwargs):
if request.user.is_authenticated:
return redirect('/')
else:
return view_func(request,*args,**kwargs)
return wrapper