Skip to content

Running the Project

fxh32 edited this page Sep 22, 2011 · 5 revisions

Once the Dependencies have been installed, the project needs a few more steps before it's ready to run.

Configuration

First you need to create a configuration file called config.py in the root directory of the project. This file is just a Python script and needs several variables filled out. Here's my sample configuration file:

# configuration
DATABASE = '/tmp/partify.db'
DEBUG = True
SECRET_KEY = 'development key'
USERNAME = 'admin'
PASSWORD = 'default'

Make sure you have a directory in which to put your database file (eg. if you use this file don't forget to mkdir tmp! The gitignore with this project is set to ignore the tmp directory so that's probably the best place to put the database file.

Set up the database

As easy as python partify/database.py. That file also has some functions that you can run from ipython or another REPL to clear and initialize the db.

Build the Javascript

The Javascript that runs in the browser is not included in the repository by default because it is compiled to from a language called Coffeescript. Issue the command make to compile the packaged Coffeescript into Javascript, which is suitable to be interpreted by the browser.

Run the project!

When you have the configuration file and database created, you can run the project by running run.py in a Python interpreter, i.e. python run.py. The application will start the development server listening on localhost at port 5000.

Clone this wiki locally