| Index: appengine/chromium_rietveld/codereview/common.py
|
| diff --git a/appengine/chromium_rietveld/codereview/common.py b/appengine/chromium_rietveld/codereview/common.py
|
| index 94834b8c87d887b15c702dea5d8cca52f26cb044..4b14eb8760cf52526ac73b7b4dc86b4482d6c26c 100644
|
| --- a/appengine/chromium_rietveld/codereview/common.py
|
| +++ b/appengine/chromium_rietveld/codereview/common.py
|
| @@ -14,4 +14,16 @@
|
|
|
| import os
|
|
|
| +from google.appengine.api import app_identity
|
| +
|
| +from django.conf import settings as django_settings
|
| +
|
| +
|
| IS_DEV = os.environ['SERVER_SOFTWARE'].startswith('Dev') # Development server
|
| +
|
| +
|
| +def get_preferred_domain_name():
|
| + """Returns preferred hostname for this GAE app."""
|
| + app_id = app_identity.get_application_id()
|
| + canonical_host = '%s.appspot.com' % app_id
|
| + return django_settings.PREFERRED_DOMAIN_NAMES.get(app_id, canonical_host)
|
|
|