add some middleware to determine whether draft modulestore or non-draft modulestore should be used

change to use regex to do the domain mappings. Also add config to AWS to be able to set from configuration file.

handle cases where HTTP_HOST is none, like in unit tests

add linefeed at end

fix up regex matches

switch to use thread local storage to hold the request itself

.

.

convert over to use open source 3rd party library

convert over to use django-cum

add unit test

remove comment

.

add comment to config setting

fix comment

use better regex for localdev

no need to break

no need to wrap an imported function, it's visible to any file that is importing us

add comment

add unit test

clean up test