title: How to check whether a user created successfully in Django
body: <p>I was trying Django and I used this code to create a user</p>
  
  <pre><code>from django.shortcuts import render
  from django.http import HttpResponse
  from django.contrib.auth.models import User    
  
  def register(request):
      user = User.objects.create_user('John', 'lennon@thebeatles.com', 'johnpassword')
      user.last_name = "James"
      user.is_active = True
      status = user.save()
      return HttpResponse(status)
  </code></pre>
  
  <p>My question is how can I check whether a user is successfully created or not and also to display an error message, if I am unable to create a user. 
  When I run this code, it creates a user but returns a value <code>None</code></p>
  
  <p>Thanks</p>