JourneyJoker/clients/mixins.py

9 lines
No EOL
298 B
Python

from localauth.mixins import LoginRequiredMixin, UserPassesTestMixin
class ClientProfileRequiredMixin(LoginRequiredMixin, UserPassesTestMixin):
def test_func(self):
try:
assert self.request.user.clientprofile
return True
except:
return False