Skip to Content
Hands-On RESTful Python Web Services - Second Edition
book

Hands-On RESTful Python Web Services - Second Edition

by Gastón C. Hillar
December 2018
Intermediate to advanced
500 pages
12h 33m
English
Packt Publishing
Content preview from Hands-On RESTful Python Web Services - Second Edition

Configuring the database

The default SQLite database engine and the database file name are specified in the games_service/games_service/settings.py Python file. In order to work with PostgreSQL 10.5 instead of SQLite for this example, replace the declaration of the DATABASES dictionary in this file with the following lines. The nested dictionary maps the database named default with the django.db.backends.postgresql database engine, the desired database name, and its settings. In this case, we will create a database named games.

Make sure you specify the desired database name in the value for the 'NAME' key and that you configure the user, password, host, and port based on the user you recently created and your PostgreSQL 10.5 configuration. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building RESTful Python Web Services

Building RESTful Python Web Services

Gastón C. Hillar
Python Command Line Tools

Python Command Line Tools

Alfredo Deza, Noah Gift

Publisher Resources

ISBN: 9781789532227Supplemental Content