1👍
You can use an unified view and return different views from that according to your logic –
def accounts_view(request):
if request.user.is_student(): # <-- check with your logic, is_student() is a stub
return StudentProfileDetailView.as_view()
elif request.user.is_institute():
return InstitutionProfileDetailView.as_view()
And point accounts/
to accounts_view
.
Source:stackexchange.com