Browse Source

updated production settings

sleepytaco 3 years ago
parent
commit
6969d6085d
3 changed files with 3 additions and 3 deletions
  1. 1 1
      UnTube/asgi.py
  2. 1 1
      UnTube/wsgi.py
  3. 1 1
      manage.py

+ 1 - 1
UnTube/asgi.py

@@ -13,7 +13,7 @@ from django.core.asgi import get_asgi_application
 
 # If WEBSITE_HOSTNAME is defined as an environment variable, then we're running
 # on Azure App Service and should use the production settings in production.py.
-settings_module = "UnTube.production" if 'WEBSITE_HOSTNAME' in os.environ else 'UnTube.settings'
+settings_module = "UnTube.production" if 'PYTHONANYWHERE_SITE' in os.environ else 'UnTube.settings'
 os.environ.setdefault('DJANGO_SETTINGS_MODULE', settings_module)
 
 application = get_asgi_application()

+ 1 - 1
UnTube/wsgi.py

@@ -13,7 +13,7 @@ from django.core.wsgi import get_wsgi_application
 
 # If WEBSITE_HOSTNAME is defined as an environment variable, then we're running
 # on Azure App Service and should use the production settings in production.py.
-settings_module = "UnTube.production" if 'WEBSITE_HOSTNAME' in os.environ else 'UnTube.settings'
+settings_module = "UnTube.production" if 'PYTHONANYWHERE_SITE' in os.environ else 'UnTube.settings'
 os.environ.setdefault('DJANGO_SETTINGS_MODULE', settings_module)
 
 application = get_wsgi_application()

+ 1 - 1
manage.py

@@ -6,7 +6,7 @@ import sys
 
 def main():
     """Run administrative tasks."""
-    settings_module = "UnTube.production" if 'WEBSITE_HOSTNAME' in os.environ else 'UnTube.settings'
+    settings_module = "UnTube.production" if 'PYTHONANYWHERE_SITE' in os.environ else 'UnTube.settings'
     os.environ.setdefault('DJANGO_SETTINGS_MODULE', settings_module)
     try:
         from django.core.management import execute_from_command_line