title: How to gracefully handle DoesNotExist exception when admin user is not found?
body: <p>I have a created_by field in my model which defaults to the admin user upon object creation. I am fetching the admin user using this piece of code,</p>
  <pre><code>admin_user_name = settings.ADMIN_USER_NAME
  admin = User.objects.get(username=admin_user_name)
  </code></pre>
  <p>Now if I have to handle the object.DoesNotExist exception like</p>
  <pre><code>try:
     admin_user_name = settings.ADMIN_USER_NAME
     admin = User.objects.get(username=admin_user_name)
  except User.DoesNotExist:
      # handle the exception gracefully
  </code></pre>
  <p>How do I handle the exception without throwing an error in such a case?</p>
  <p>Update:
  The created_by field is made available by inheriting the following</p>
  <pre><code>class AbstractUserBase(models.Model):
      created_by = models.ForeignKey(User,related_name='%(class)s_createdby',on_delete=models.CASCADE)
  
      class Meta:
          abstract = True
  </code></pre>