Make templates and then make documents from templates:
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Build Status


What is it?

The template maker is a Flask app that allows you to generate templates and then use those templates to generate documents.

What's the status?

The template-maker is currently a prototype in pre-alpha. We are still both testing the concept and the underlying core UI/UX. It is, however, currently online.

Feature status:
Feature Status
Write templates from scratch Alpha Deployed
Generate documents from a pre-written template Alpha Deployed
Write and manage boilerplate sections Designing initial prototype
Searchable library of sections Designing initial prototype

Who made it?

The template maker is a project of the 2015 Pittsburgh Code for America fellowship team


Core Dependencies

The template-maker is a Flask app. It uses Postgres for a database and uses npm and bower to manage most of its dependencies. It also uses less to compile style assets.

It is highly recommended that you use use virtualenv (and virtualenvwrapper for convenience). For a how-to on getting set up, please consult this howto. Additionally, you'll need node to install bower (see this howto for more on Node), and it is recommended that you use to handle your Postgres (assuming you are developing on OSX).


Use the following commands to bootstrap your environment:

python app:

# clone the repo
git clone
# change into the repo directory
cd template-maker
# install python dependencies
pip install -r requirements.txt
# note -- this will only install production dependencies, if you need dev dependencies run the following
pip install -r requirements/dev.txt


# login to postgres. If you are using, you can click
# the little elephant in your taskbar to open this
create database template_maker;

Once you've created your database, you'll need to open template_maker/ and edit the DevConfig to use the proper SQLAlchemy database configuration string. Then:

# upgrade your database to the latest version
python db upgrade


# install bower
npm install -g bower
# use bower to install the dependencies
bower install

Now, you are ready to roll!

# run the server
python server

login and user accounts

The template maker uses persona to handle authentication. Custom role-based authorization is in the works. However, you will need to sign in through persona and then enter yourself into the database in order to have access to the pages in question. The fastest way to do this is to log into the shell:

python shell
# the shell is a python shell that automatically has access to your database
from template_maker.users.models import User
user = User(email=<your_email_here>, first_name=<your_first_name>, last_name=<your_last_name>, is_admin=True)

Now, logging in through persona should also give you access to the app.


In order to run the tests, you will need to create a test database. You can follow the same procedures outlined in the install section. By default, the database should be named test_template_maker:

create database test_template_maker;

Tests are located in the template_maker_test directory. To run the tests, run

PYTHONPATH=. nosetests template_maker_test/

from inside the root directory. For more coverage information, run

PYTHONPATH=. nosetests template_maker_test/ -v --with-coverage --cover-package=template_maker --cover-erase