title: select data from a database out of my django app
body: <p>How I can select data from a database that is not inside my django app?</p>
  
  <p>How I should connect my django query to a database that has not been created by my django app?</p>
  
  <p>I have put this code in views.py:</p>
  
  <pre><code>def select(request):
      p = user.objects.filter(country='Iran')
      return HttpResponse(p)
  </code></pre>
  
  <p>If the database had been created by django app then there was need to add this part into <code>views.py</code>:
  (for example)</p>
  
  <pre><code>from users.models import user
  </code></pre>
  
  <p>But here what should I do?</p>
  
  <p>P.S:</p>
  
  <p>I'm using pymysl in my django project and have installed lamp in my linux os, and using phpmyadmin. Any more explanation is needed?</p>