diff options
Diffstat (limited to 'bitbake/lib/toaster/toastermain/wsgi.py')
-rw-r--r-- | bitbake/lib/toaster/toastermain/wsgi.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastermain/wsgi.py b/bitbake/lib/toaster/toastermain/wsgi.py new file mode 100644 index 0000000000..031b314b1a --- /dev/null +++ b/bitbake/lib/toaster/toastermain/wsgi.py | |||
@@ -0,0 +1,35 @@ | |||
1 | """ | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | # | ||
5 | WSGI config for Toaster project. | ||
6 | |||
7 | This module contains the WSGI application used by Django's development server | ||
8 | and any production WSGI deployments. It should expose a module-level variable | ||
9 | named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover | ||
10 | this application via the ``WSGI_APPLICATION`` setting. | ||
11 | |||
12 | Usually you will have the standard Django WSGI application here, but it also | ||
13 | might make sense to replace the whole Django WSGI application with a custom one | ||
14 | that later delegates to the Django one. For example, you could introduce WSGI | ||
15 | middleware here, or combine a Django application with an application of another | ||
16 | framework. | ||
17 | |||
18 | """ | ||
19 | import 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" | ||
25 | os.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. | ||
30 | from django.core.wsgi import get_wsgi_application | ||
31 | application = get_wsgi_application() | ||
32 | |||
33 | # Apply WSGI middleware here. | ||
34 | # from helloworld.wsgi import HelloWorldApplication | ||
35 | # application = HelloWorldApplication(application) | ||