9 lines
300 B
Python
9 lines
300 B
Python
|
from localauth.mixins import LoginRequiredMixin, UserPassesTestMixin
|
||
|
|
||
|
class PartnerProfileRequiredMixin(LoginRequiredMixin, UserPassesTestMixin):
|
||
|
def test_func(self):
|
||
|
try:
|
||
|
assert self.request.user.partnerprofile
|
||
|
return True
|
||
|
except:
|
||
|
return False
|