12 lines
No EOL
339 B
Python
12 lines
No EOL
339 B
Python
from localauth.mixins import UserPassesTestMixin
|
|
|
|
class PartnerProfileRequiredMixin(UserPassesTestMixin):
|
|
def test_func(self):
|
|
try:
|
|
assert self.request.user.partnerprofile
|
|
return True
|
|
except:
|
|
return False
|
|
|
|
def get_login_url(self):
|
|
return reverse_lazy("partners:register") |