blob: 031b314b1a2df38c9ef41872b70059c72ac4e667 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001"""
2# ex:ts=4:sw=4:sts=4:et
3# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
4#
5WSGI config for Toaster project.
6
7This module contains the WSGI application used by Django's development server
8and any production WSGI deployments. It should expose a module-level variable
9named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
10this application via the ``WSGI_APPLICATION`` setting.
11
12Usually you will have the standard Django WSGI application here, but it also
13might make sense to replace the whole Django WSGI application with a custom one
14that later delegates to the Django one. For example, you could introduce WSGI
15middleware here, or combine a Django application with an application of another
16framework.
17
18"""
19import os
20
21# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
22# if running multiple sites in the same mod_wsgi process. To fix this, use
23# mod_wsgi daemon mode with each site in its own daemon process, or use
24# os.environ["DJANGO_SETTINGS_MODULE"] = "Toaster.settings"
25os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toastermain.settings")
26
27# This application object is used by any WSGI server configured to use this
28# file. This includes Django's development server, if the WSGI_APPLICATION
29# setting points here.
30from django.core.wsgi import get_wsgi_application
31application = get_wsgi_application()
32
33# Apply WSGI middleware here.
34# from helloworld.wsgi import HelloWorldApplication
35# application = HelloWorldApplication(application)