sc3/cookcountyjail — pull request #342 by bepetersn (2014-05-03 09:40:35+00:00)
Title: major refactoring of project files/folders, preparing django app to coexist /w v2.0 API

In general, these changes are either:

**1) thinning the django app and removing unnecessary files.**

`admin.py`, `views.py` have been deleted altogether; `settings.py`, `wsgi.py` are now in the django app proper under `countyapi/`; and the old top-level `urls.py` was merged with the one under `countyapi/`. The result is that we no longer have the useless `cookcountyjail` directory under project root. Slightly less necessarily, I also deleted django's `tests.py`. The only things it had in it were tests for POST functionality, which we don't actually use. Perhaps least necessarily, `data/bootstrap.sql` was also removed... it seems like it was there for initializing an empty database, but I've never heard anyone mention it, or seen it referenced in our code. It can be brought back if anyone cares about it.

**2) externalizing the django app as much as possible, thus making the project root a more viable home for components/code.**

The big one here is the scraper, which is a top-level component, in the project root. I also moved `utils.py` to the project root, under the supposition that it might be useful to a django app or a flask app equally.

3) just setting up a better project structure for the future

`cron.sh` and `gunicorn.sh` were moved into scripts, where they probably belonged in the first place. The `templates/` directory has changed to `static/`, and could hold css, js, or just html used by any application associated with this project.

All the resultant code from these refactorings allows the django server to run, and passes all tests. This was the best I could do for seeing that nothing was broken, but I wouldn't be surprised if there were another bug, even though I knew where to look for some of them.