diff options
author | CruiseDevice | 2018-02-19 15:01:22 +0530 |
---|---|---|
committer | CruiseDevice | 2018-02-19 15:01:22 +0530 |
commit | b84648fa3730d8b258bbc4ada0dcbde5a033f747 (patch) | |
tree | d97bfe8f70e43a58a2d7f8fe7a61a00554ba4f14 /sbhs_server/settings.py | |
parent | 6f76f85bc264a58cea717ca8f8bd60b411828dd5 (diff) | |
download | SBHS-2018-Rpi-b84648fa3730d8b258bbc4ada0dcbde5a033f747.tar.gz SBHS-2018-Rpi-b84648fa3730d8b258bbc4ada0dcbde5a033f747.tar.bz2 SBHS-2018-Rpi-b84648fa3730d8b258bbc4ada0dcbde5a033f747.zip |
initial commit
Diffstat (limited to 'sbhs_server/settings.py')
-rw-r--r-- | sbhs_server/settings.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sbhs_server/settings.py b/sbhs_server/settings.py index fd70f92..4f8db33 100644 --- a/sbhs_server/settings.py +++ b/sbhs_server/settings.py @@ -14,7 +14,9 @@ import sbhs_server.credentials as credentials hostname = socket.gethostname() -is_production = hostname == "vlabssbhs" +is_production = True + +hostname == "vlabs-sbhs" # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os @@ -27,6 +29,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = credentials.PROJECT_SECRET_KEY + + # SECURITY WARNING: don't run with debug turned on in production! DEBUG = not is_production @@ -40,6 +44,7 @@ ALLOWED_HOSTS = [ "192.168.43.208", "192.168.43.144", "10.42.0.1", + "vlabs.iitb.ac.in", ] if is_production: @@ -78,6 +83,7 @@ INSTALLED_APPS = ( 'sbhs_server.tables', 'webcam', 'maintenance', + 'django_extensions', ) MIDDLEWARE = ( @@ -132,9 +138,9 @@ USE_L10N = True USE_TZ = False AUTH_USER_MODEL = 'tables.Account' -LOGIN_URL = '/sbhs-rpi/enter' -LOGOUT_URL = '/sbhs-rpi/logout' -SESSION_EXPIRE_AT_BROWSER_CLOSE = True +LOGIN_URL = '/sbhs/enter' +LOGOUT_URL = '/sbhs/logout' +SESSION_EXPIRE_AT_BROWSER_CLOSE = True # Browser-length session CSRF_COOKIE_NAME = "pfesgbxra" SESSION_COOKIE_NAME = "frffvbaVq" @@ -150,8 +156,8 @@ ADMIN_EMAIL=credentials.ADMIN_EMAIL if is_production: - BASE_URL = "http://vlabs.iitb.ac.in/sbhs-rpi/" - FORCE_SCRIPT_NAME = "/sbhs-rpi" + BASE_URL = "http://vlabs.iitb.ac.in/sbhs/" + FORCE_SCRIPT_NAME = "/sbhs" USE_X_FORWARDED_HOST = True else: BASE_URL = "http://127.0.0.1/" @@ -164,7 +170,7 @@ STATICFILES_DIRS = ( if is_production: STATIC_ROOT = os.path.join(BASE_DIR, "production_static_files") - STATIC_URL = 'http://vlabs.iitb.ac.in/sbhs-rpi/static/' + STATIC_URL = 'http://vlabs.iitb.ac.in/sbhs/static/' else: STATIC_URL = '/static/' @@ -256,4 +262,4 @@ online_mids = list(pi_ip_map.keys()) print "No of machines online : ", len(online_mids) import sys -print >>sys.stderr, online_mids[:]
\ No newline at end of file +print >>sys.stderr, online_mids[:] |