jeads/datazilla — pull request #20 by carljm (2012-05-19 02:01:05+00:00)
Title: Don't require config via environment variables.

This pull request makes it possible to configure datazilla entirely via `settings/local.py`, which is how IT is accustomed to configuring Django projects.

It doesn't remove the ability to configure via env vars; in fact, if no `local.py` is present, the same env vars that are used now will still provide the fallback defaults for the same settings.

Since Django settings are now the canonical source for configuration of all of datazilla, not just the webapp portion, I moved the settings out to `datazilla/settings/base.py`. I added a `datazilla/settings/local.sample.py` which can be coped to `datazilla/settings/local.py` and modified as needed for local configuration (the latter is git-ignored).

In the process of reviewing the settings, I noticed that `MEDIA_URL` and `STATIC_URL` were being used incorrectly. In the Django world, "media" is user-uploaded files (which Datazilla does not have), and "static assets" are CSS, JS, etc that is packaged with the project. In order to reduce terminology confusion for any future coders familiar with Django working on this project, I renamed `datazilla/webapp/media` to `datazilla/webapp/static` and made the adjustments throughout CSS and JS files to refer to other assets at the URL path `/static/...` rather than `/media/...`. This requires a minor change to the Nginx config file, which I've made to the sample nginx config.

As usual, feel free to comment if I've missed something or something here isn't acceptable!