zulip/zproject
Steve Howell e47e1cd648 droplet settings: Fix hostname-related settings.
We recently changed our droplet setup such that their
host names no longer include zulipdev.org.  This caused
a few things to break.

The particular symptom that this commit fixes is that
we were trying to server static assets from
showell:9991 instead of showell.zulipdev.org:9991,
which meant that you couldn't use the app locally.
(The server would start, but the site's pretty unusable
without static assets.)

Now we rely 100% on `dev_settings.py` to set
`EXTERNAL_HOST` for any droplet users who don't set
that var in their own environment.  That allows us to
remove some essentially duplicate code in `run-dev.py`.

We also set `IS_DEV_DROPLET` explicitly, so that other
code doesn't have to make inferences or duplicate
logic to detemine whether we're a droplet or not.

And then in `settings.py` we use `IS_DEV_DROPLET` to
know that we can use a prod-like method of calculating
`STATIC_URL`, instead of hard coding `localhost`.

We may want to iterate on this further--this was
sort of a quick fix to get droplets functional again.
It's possible we can re-configure droplets to have
folks get reasonable `EXTERNAL_HOST` settings in their
bash profiles, or something like that, although that
may have its own tradeoffs.
2020-04-24 12:33:27 -07:00
..
jinja2 static: Serve webpack bundles from the root domain. 2020-04-10 00:48:02 -07:00
__init__.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
backends.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
config.py python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
default_settings.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
dev_settings.py droplet settings: Fix hostname-related settings. 2020-04-24 12:33:27 -07:00
dev_urls.py static: Serve webpack bundles from the root domain. 2020-04-10 00:48:02 -07:00
email_backends.py python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
legacy_urls.py urls: Move the json/fetch_api_key endpoint to be an API-style route. 2018-01-08 13:15:52 -05:00
prod_settings_template.py saml: Implement limiting of IdP to specified realms. 2020-04-16 17:04:08 -07:00
settings.py droplet settings: Fix hostname-related settings. 2020-04-24 12:33:27 -07:00
slack_importer_test_settings.py settings: Migrate test settings to modern postgres backend name. 2019-01-23 17:08:24 -08:00
terms.md.template Add TERMS_OF_SERVICE setting. 2016-07-29 20:47:31 -07:00
test_settings.py static: Serve webpack bundles from the root domain. 2020-04-10 00:48:02 -07:00
urls.py upload: Include filename at the end of temporary access URLs. 2020-04-20 10:25:48 -07:00
wsgi.py setup_path_on_import: Replace with setup_path function. 2020-02-25 15:40:21 -08:00