summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastermain/wsgi.py
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /bitbake/lib/toaster/toastermain/wsgi.py
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'bitbake/lib/toaster/toastermain/wsgi.py')
-rw-r--r--bitbake/lib/toaster/toastermain/wsgi.py35
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#
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)