---
title: "From Project to Productionized with Python"
description: "The post presents a hands-on tutorial for Python developers moving a local Django application into production on Heroku. It frames the work around 12-factor practices and covers repository hygiene, modular settings, continuous delivery stages, static-asset middleware, environment configuration, database provisioning, deployment, scaling, and troubleshooting. The configuration changes include excluding virtual environments, caches, SQLite data, and generated static files; moving settings.py to settings/base.py; updating DJANGO_SETTINGS_MODULE; adding Whitenoise; and supplying SECRET_KEY and a Heroku Postgres add-on. The deployment uses Git, the Heroku CLI, git push heroku main, and heroku ps:scale web=1, with heroku logs --tail and heroku run bash for diagnosis. The walkthrough concludes with the app deployed and accessible through heroku open."
---

# From Project to Productionized with Python

[Heroku](https://yomu.fyi/company/heroku) · Ed Morley · Jun 22, 2020

**Type:** Tutorial

## Summary

The post presents a hands-on tutorial for Python developers moving a local Django application into production on Heroku. It frames the work around 12-factor practices and covers repository hygiene, modular settings, continuous delivery stages, static-asset middleware, environment configuration, database provisioning, deployment, scaling, and troubleshooting. The configuration changes include excluding virtual environments, caches, SQLite data, and generated static files; moving settings.py to settings/base.py; updating DJANGO\_SETTINGS\_MODULE; adding Whitenoise; and supplying SECRET\_KEY and a Heroku Postgres add-on. The deployment uses Git, the Heroku CLI, git push heroku main, and heroku ps:scale web=1, with heroku logs --tail and heroku run bash for diagnosis. The walkthrough concludes with the app deployed and accessible through heroku open.

## Context

The tutorial addresses the process of taking a local Django application and preparing it for production deployment on Heroku, including the configuration and operational practices associated with a 12-factor application.

## Approach / What changed

It updates project files and settings, separates configuration into a base settings module, adds middleware and deployment configuration, provisions Heroku Postgres, pushes the application with Git, scales its web process, and provides CLI-based logging and remote-console troubleshooting.

## Takeaways

- The Django settings are split by moving settings.py to settings/base.py and updating manage.py and wsgi.py to use gettingstarted.settings.base.
- The deployment provisions Postgres with heroku addons:create heroku-postgresql:hobby-dev instead of relying on the local SQLite database.
- After git push heroku main, the web process is scaled with heroku ps:scale web=1; heroku logs --tail and heroku run bash support troubleshooting.

**Tags:** [CI/CD](https://yomu.fyi/topic/ci-cd), [Django](https://yomu.fyi/topic/django), [Heroku](https://yomu.fyi/topic/heroku), [Postgres](https://yomu.fyi/topic/postgres), [Python](https://yomu.fyi/topic/python)

- Source: [Heroku](https://www.heroku.com/blog/from-project-to-productionized-python)
- Source URL: https://www.heroku.com/blog/from-project-to-productionized-python
- Ingested by Yomu: 2026-09-09T16:04:31.170Z

[Read original post](https://www.heroku.com/blog/from-project-to-productionized-python)
