title: Django ValueError: The view usermanager.views.group_perm didn't return an HttpResponse object. It returned None instead
body: <p>I am creating a News Website. When I try to delete permission from a group the same error is showing. The codes above this function are almost same. But they are working fine.Please Help</p>
  
  <p><strong>This is my view file</strong>
  def group_perm(request, name):</p>
  
  <pre><code>if not request.user.is_authenticated:
      return redirect('my_login')
  
  
  perm = 0
  
  for i in request.user.groups.all():
      if i.name == "masteruser": perm = 1
  
  if perm == 0:
      error = "Access Denied"
      return render(request, 'back/error.html',{'error': error})
  
  
  permission = Permission.objects.all()
  
  
  for group in Group.objects.filter(name=name):
      gperm = group.permissions.all()
  
  
      return render(request, 'back/group_perm.html', {'gperm':gperm, 'name':name, 'permission': permission})
  </code></pre>
  
  <p>def group_permission_del(request, gname, name):</p>
  
  <pre><code>if not request.user.is_authenticated:
      return redirect('my_login')
  
  
  perm = 0
   #"request.user" means current logged User
  for i in request.user.groups.all():
      if i.name == "masteruser": perm = 1
  
  if perm == 0:
      error = "Access Denied"
      return render(request, 'back/error.html',{'error': error})
  
  
  
  group = Group.objects.get(name=gname)
  
  gperm = Permission.objects.get(codename=name)
  
  
  group.permissions.remove(gperm)
  
  return redirect('manage_permission')
  </code></pre>