O'Reilly logo

Python Tools for Visual Studio by Cathy Wang, Martino Sabia

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up and managing a database for a Django project

Once a working Django project is set up, we will need to attach a database in order to have a place to store the website data and the overall configuration of the Django admin console. For the purpose of this book, we are going to use a SQLite database, which is easy to manage, to connect to the project. It's a file-based database and can be easily managed by Django. For more information on SQLite, refer to its website at http://www.sqlite.org/.

Attaching a database to Django is really easy. You just have to tell Django which database to use and how to connect to it. This has to be done in the Django settings.py file. To connect to and create a SQLite database, the database section of code ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required