Chapter 14. Deployment Revisited: The Finishing Touches

Image

You’re coming to the end of the start of your Python journey.

In this, the final chapter of this book, you adjust your webapp to use MariaDB as your database backend as opposed to SQLite, then tweak things to deploy the latest version of your webapp on PythonAnywhere. In doing so, the Coach gets access to a system that supports any number of swimmers attending any number of swim sessions. There’s not a lot of new Python in the chapter, as you spend most of your time adjusting your existing code to work with MariaDB and PythonAnywhere. Your Python code never exists in isolation: it interacts with its environment and the systems it depends on.

Image

We promise: we’re almost done.

The webapp code has been updated to support as many training sessions as the Coach can throw at it. Once a training session is selected, the system adapts to only show the data from that session. This is exactly what the Coach wants.

All that remains is to replace the webapp currently running on PythonAnywhere with your new code. But, is it a matter of simply copying over your existing cloud-based code?

Image

Cubicle Conversation

Sam: This database integration ...

Get Head First Python, 3rd Edition 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.