JourneyJoker/clients/mixins.py

9 lines
298 B
Python
Raw Normal View History

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