correcting note on static file hosting for dev
[oweals/karmaworld.git] / README.md
index 9a628a3cbe2220be4ac23bcce9628ef882c336c3..70034ec16af1e5fdbe10555f906d85d6fc796600 100644 (file)
--- a/README.md
+++ b/README.md
@@ -74,16 +74,18 @@ to get SSL running on your server with Heroku.
 
 ## External Service Dependencies
 
-Notice: This software makes use of external third party services which require
+Notice: A number of services are required even if running the KarmaWorld web
+service [locally](#local). Some of the services are recommended, and some are
+completely optional even if running the web service on Heroku.
+
+This software makes use of external third party services which require
 accounts to access the service APIs. Without these third parties available,
-this software may require considerable overhaul. These services have
-API keys, credentials, and other information that you must provide to KarmaWorld
-as environment variables. The best way to persist these environment variables is
-by using a `.env` file.  Copy `.env.example` to `.env` and populate the fields as required.
+this software may require considerable overhaul. These services have API keys,
+credentials, and other information that you must provide to KarmaWorld
+as environment variables.
 
-A number of services are required even if running the KarmaWorld web service
-locally, some of the services are recommended, and some are completely optional
-even if running the web service on Heroku.
+The best way to persist these API keys in environment variables is by using a
+`.env` file.  Copy `.env.example` to `.env` and populate the fields as required.
 
 Many of these services have free tiers and can be used without charge for
 development testing purposes.
@@ -361,7 +363,7 @@ environment variables `TWITTER_CONSUMER_KEY`, `TWITTER_CONSUMER_SECRET`,
 
 ## Configuring foreman
 
-KarmaNotes runs on Heroku as a webapp and thus makes use of a Procfie. While
+KarmaNotes runs on Heroku as a webapp and thus makes use of a Procfile. While
 not strictly necessary, KarmaWorld can use the same basic Procfile which is
 convenient and consistent.
 
@@ -413,16 +415,16 @@ Then patch the javascript on your system by running this code in the shell.
   1. `source venv/bin/activate`
   1. `pip install -r requirements.txt`
     * on Debian systems, some packages are required for pip to succeed:
-    * `apt-get install python-dev libpython-dev python-psycopg2 libmemcached-dev libffi-dev libssl-dev postgresql-server-dev-X.Y`
+    * `apt-get install python-dev libpython-dev python-psycopg2 libmemcached-dev libffi-dev libssl-dev postgresql-server-dev-X.Y`libxml2-dev libxslt-dev
   1. `pip install -r requirements-dev.txt`
 
 ## Configuration
 
-Make sure [External Service Dependencies](#external_service_dependencies) are
+Make sure [External Service Dependencies](#external-service-dependencies) are
 satisfied. This includes running a local database and RabbitMQ instance as
 desired.
 
-  1. configure `.env` as per [instructions](#external_service_dependencies)
+  1. configure `.env` as per [instructions](#external-service-dependencies)
   1. `foreman run python manage.py syncdb --migrate --noinput`
   1. `foreman run python manage.py createsuperuser`
   1. `foreman run python manage.py fetch_usde_csv ./schools.csv`
@@ -436,6 +438,13 @@ desired.
 * `fetching_usde_csv` requires `7zip` to be installed for processing compressed
      archives. On Debian-based systems, this entails `apt-get install p7zip-full`
 
+If using `DJANGO_SETTINGS_MODULE='karmaworld.settings.dev'` in `.env`, static
+file hosting should be done by local files.  `DEFAULT_FILE_STORAGE` should be
+set to `django.core.files.storage.FileSystemStorage`.
+
+If using `DJANGO_SETTINGS_MODULE='karmaworld.settings.prod'` in `.env`, static
+file hosting is done by `DEFAULT_FILE_STORAGE` defined in `.env`.
+
 ## Run
 
 Make sure you are inside your virtual environment (`source venv/bin/activate`).