philipdexter/pyboard — pull request #10 by scizzorz (2013-09-05 18:28:52+00:00)
Title: Clean up almost all of the codebase

I pretty much just went straight through `main.py` and cleaned up code everywhere...

* Added a bunch of solid templates with template inheritance and all those cool features
* Updated all the HTML to HTML5 and added a bit of CSS to jazz it up
* Enabled the builtin Flask dev server
* Used `flask.abort(...)` instead of just `return "nope"`
* Added a `sections` file
* Each line is a section label, tab, and instructor:

```
a0 Lander
b1 Williams
```
* Added a `send_email(...)` function to reduce email duplication (reference #4)
* Tried to eliminate most `subprocess` calls and replace them with the Pythonic equivalent

I didn't actually test the email features because I don't have a mail server set up, so I would test it out before you merge this. I also didn't touch any of the grade submission / download code because it was scary.

If you merge this and pull it to your production server, you'll need to update the following:

* Add a `sections` file
* Add an `email_from` variable to your `serverconfig.py` that acts as the default sending address