This is the view which was written for my django project.
if user is not None:
if user.is_active:
auth_login(request, user)
return HttpResponseRedirect('/home/')
else:
messages.error(self.request,
_("User is not Active"))
return HttpResponseRedirect('/')
else:
messages.error(self.request,_("User Does not Exist"))
return HttpResponseRedirect(settings.LOGIN_URL)
Suppose there is 3 groups of users customer,admin and super admin. How can I redirect the views to different html for each of the user groups? Thank You
you can do it like this
or if the user has many groups