title: How to delete user in django?
body: <p>This may sounds a stupid question but I have difficulty deleting users in django using this view:</p>
  
  <pre><code>@staff_member_required 
  def del_user(request, username):    
      try:
          u = User.objects.get(username = username)
          u.delete()
          messages.sucess(request, "The user is deleted")
      except:
        messages.error(request, "The user not found")    
      return render(request, 'front.html')
  </code></pre>
  
  <p>in urls.py I have</p>
  
  <pre><code>url(r'^del_user/(?P&lt;username&gt;[\w|\W.-]+)/$', 'profile.views.del_user'), 
  </code></pre>
  
  <p>Instead the user being deleted I get <code>The user not found</code>.</p>
  
  <p>What can be wrong here?</p>