vendredi 5 février 2016

how can I link db to django?

I am trying to create a website, just for fun. I read the django documentation. Till now, I am done with the urls, templates, views, etc. Now, when I was thinking of linking it to the db. Reading the django documentation online, I am finding it hard to understand.

  • I wanted to use "MySQL". so i used pip to install mysqldb, installed mysql installer, and installed all other software, including workbench, command-line client, utilities, notifier, etc (I had no idea how they work, but I just wanted the things to go right.). Changed the setting for it. But it didn't work. or, I don't know how to work on it.
  • When "MySQL" didn't work out, I switched to the default "sqlite". But now I have no idea, how to work on it either. I created the models, so how can I create the tables, how can I view them, how can I modify them?? Do I need to install some software, or it can be done using the command prompt?

OS : Windows 10 PYTHON VER : 2.7


Please, explain in detail, how can I establish a link between django and db?

Aucun commentaire:

Enregistrer un commentaire