title: Check if Internal IP with Django
body: <p>I am trying to create a function that will return <code>True</code> or <code>False</code> depending on if the ip address of the user is an internal or external IP address. We would like internal users to be able to see more things and have more access. We're looking to do this as 'inexpensively' as possible. I know how to query the general IP and use conditional logic against a tuple. What I'm wondering is can Django do most of this for me?</p>
  
  <p>Example:</p>
  
  <pre><code>if request.is_internal():
      #Do Special Secret Internal Stuff Things!
  </code></pre>
  
  <p>I've read a bit about Django's <a href="https://docs.djangoproject.com/en/1.5/ref/settings/#internal-ips" rel="nofollow">INTERNAL_IPS</a> but it seems to only be used for debugging, and will not allow me to call it. Am I wrong on that?</p>