title: Want to use my existing mysql database with django
body: <p>I have created a django project and now rendering templates. I have a mysql database already with loads of tables and data. </p>
  
  <p>From what i saw in the tutorials, the model concept of python is interesting and easy however i am not able to use it here, as i have no models available i guess. Was assuming django would magically create models based on my db. </p>
  
  <p>I have filled up settings.py with engine, db, username, host, port etc.,
  Do i have to create models based on my tables?</p>
  
  <p>This works thou:</p>
  
  <pre><code>db = MySQLdb.connect(user='root', db='dbBooks', passwd='1234', host='localhost')
  cursor = db.cursor()
  cursor.execute('SELECT bookname FROM books')
  names = [row[0] for row in cursor.fetchall()]
  db.close()
  return render(request, 'index.html', {'bookNames': names})
  </code></pre>