Installing PostgreSQL

You are currently using SQLite for your blog project. This is sufficient for development purposes. However, for a production environment, you will need a more powerful database, such as PostgreSQL, MySQL, or Oracle. We will change our database to PostgreSQL to benefit from its full-text search features.

If you are using Linux, install dependencies for PostgreSQL to work with Python, like this:

sudo apt-get install libpq-dev python-dev

Then, install PostgreSQL with the following command:

sudo apt-get install postgresql postgresql-contrib

If you are using macOS X or Windows, download PostgreSQL from https://www.postgresql.org/download/ and install it.

You also need to install the Psycopg2 PostgreSQL adapter for Python. ...

Get Django 2 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.