Stanford-Online/class2go — pull request #1227 by jrbl (2012-11-02 23:40:40+00:00)
Title: Improve asset link generation for 'local' sites

* Fixes bug in dl_link() for Files and Videos that created bad output
for assets not hosted on S3.

* Extends update_site to optionally accept a site name to set the Site
value in the database. This can be used to make the links correct for
development machines:
manage.py update_site localhost:8888
will generate links like:
http://localhost:8888/some/path
Notice that the old default still applies:
manage.py update_site
will generate links like:
http://class.stanford.edu/some/path

* Creates small util methods get_site_domain() and get_site_url(), which
should start to be used everywhere they make sense.