1👍
Use:
from django.contrib.auth.decorators import user_passes_test
@user_passes_test(lambda u: u.is_active)
def my_view(request):
# blah
Source:stackexchange.com
1👍
Use:
from django.contrib.auth.decorators import user_passes_test
@user_passes_test(lambda u: u.is_active)
def my_view(request):
# blah