import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "oabutton.settings")

from django.core.wsgi import get_wsgi_application

# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.

from dj_static import Cling
application = Cling(get_wsgi_application())

# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)

import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "oabutton.settings")

# Enable Django secure mode (see http://security.stackexchange.com/a/8970)
os.environ["HTTPS"] = "on"

from django.core.wsgi import get_wsgi_application

# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.

from dj_static import Cling
application = Cling(get_wsgi_application())

# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)

Enable Django secure mode in WSGI module
Enable Django secure mode in WSGI module

  import os
  
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "oabutton.settings")
+ 
+ # Enable Django secure mode (see http://security.stackexchange.com/a/8970)
+ os.environ["HTTPS"] = "on"
  
  from django.core.wsgi import get_wsgi_application
  
  # This application object is used by any WSGI server configured to use this
  # file. This includes Django's development server, if the WSGI_APPLICATION
  # setting points here.
  
  from dj_static import Cling
  application = Cling(get_wsgi_application())
  
  # Apply WSGI middleware here.
  # from helloworld.wsgi import HelloWorldApplication
  # application = HelloWorldApplication(application)
  
Enable Django secure mode in WSGI module
## Code Before:
import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "oabutton.settings")

from django.core.wsgi import get_wsgi_application

# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.

from dj_static import Cling
application = Cling(get_wsgi_application())

# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)

## Instruction:
Enable Django secure mode in WSGI module
## Code After:
import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "oabutton.settings")

# Enable Django secure mode (see http://security.stackexchange.com/a/8970)
os.environ["HTTPS"] = "on"

from django.core.wsgi import get_wsgi_application

# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.

from dj_static import Cling
application = Cling(get_wsgi_application())

# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)
