Python/Django Web application example
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Python/Django Web application example

A Python/Django Base Web application.

Python modules:

  • django: Full featured Web framework
  • gunicorn: Python WSGI HTTP Server for UNIX
  • django_heroku: Heroku module for deployment integration


Install python packages

pip install -r requirements.txt

Prepare database

python migrate

python createsuperuser

Run the web service (Debug mode)

Modify webapp/ with DEBUG = False

python runserver

Run the web service (Production mode)

python collectstatic

python runserver

Access the web service

Go to http://localhost:8000/ for the main site

Go to http://localhost:8000/admin/ for the administrator interface, using your previously created super user.

Deployment to Heroku

Install Heroku client

This command line interface (CLI) helps to do some tasks related to Heroku.

You can install this tool following the official guide.

The main steps are:

1.- For MacOS, install Homebrew and run brew install heroku/brew/heroku

2.- In Ubuntu/Debian based systems, install SnapCraftand run sudo snap install --classic heroku

3.- For windows, download and execute the installer.

Login into Heroku

You need an accout in to login.

heroku login [--interactive]

Register your application in Heroku

Using the Heroku Dashboard

1.- Create an account in to login (

2.- After registation, go to

3.- Create a new application using the button [Add] (

Using the Heroku CLI

Run inside your project folder:

heroku apps:create your-app-name

Asociate your repository with Heroku

Use the app name you previously registered in Heroku

heroku git:remote -a your-app-name

Deploy your application

git push heroku master