freedomofpress/securedrop — pull request #330 by garrettr (2014-03-06 09:10:30+00:00)
Title: db rewrite

Reworks db.py with the goal of making the code easier to read, understand, and extend. I also added flagging sources in the db. Still needs some work to DRY it out and add error handling, but I think this is a good direction. Feedback appreciated!

Note that you may need to rm your db_development.sqlite, then run `python -c "import db; db.init_db()"` because the tables have changed.