Skip to content

Commit

Permalink
remove redundant settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmednoureldeen committed Mar 12, 2019
1 parent 1cfd777 commit 2a9b9c4
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions geonode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,6 @@
else:
DJANGO_LIVE_TEST_SERVER_ADDRESS = 'localhost:8000'


# per-deployment settings should go here
SITE_HOST_NAME = os.getenv('SITE_HOST_NAME', 'localhost')
SITE_HOST_PORT = os.getenv('SITE_HOST_PORT', 8000)
_default_siteurl = "http://%s:%s/" % (SITE_HOST_NAME, SITE_HOST_PORT) if SITE_HOST_PORT else "http://%s/" % SITE_HOST_NAME
SITEURL = os.getenv('SITEURL', _default_siteurl)

# we need hostname for deployed
_surl = urlparse(SITEURL)
HOSTNAME = _surl.hostname

# add trailing slash to site url. geoserver url will be relative to this
if not SITEURL.endswith('/'):
SITEURL = '{}/'.format(SITEURL)

try:
# try to parse python notation, default in dockerized env
ALLOWED_HOSTS = ast.literal_eval(os.getenv('ALLOWED_HOSTS'))
Expand Down Expand Up @@ -713,7 +698,11 @@
#
# GeoNode specific settings
#
SITEURL = os.getenv('SITEURL', "http://localhost:8000/")
# per-deployment settings should go here
SITE_HOST_NAME = os.getenv('SITE_HOST_NAME', 'localhost')
SITE_HOST_PORT = os.getenv('SITE_HOST_PORT', 8000)
_default_siteurl = "http://%s:%s/" % (SITE_HOST_NAME, SITE_HOST_PORT) if SITE_HOST_PORT else "http://%s/" % SITE_HOST_NAME
SITEURL = os.getenv('SITEURL', _default_siteurl)

# we need hostname for deployed
_surl = urlparse(SITEURL)
Expand Down

0 comments on commit 2a9b9c4

Please sign in to comment.