~ev/uci-engine/quiet

« back to all changes in this revision

Viewing changes to ticket_system/ticket_system/wsgi.py

  • Committer: Chris Johnston
  • Date: 2013-12-09 17:29:57 UTC
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: chrisjohnston@ubuntu.com-20131209172957-y8vjn34zq17ugm8h
Add initial setup for the ticket system

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Ubuntu Continuous Integration Engine
 
2
# Copyright 2013 Canonical Ltd.
 
3
 
 
4
# This program is free software: you can redistribute it and/or modify it
 
5
# under the terms of the GNU Affero General Public License version 3, as
 
6
# published by the Free Software Foundation.
 
7
 
 
8
# This program is distributed in the hope that it will be useful, but
 
9
# WITHOUT ANY WARRANTY; without even the implied warranties of
 
10
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
11
# PURPOSE.  See the GNU Affero General Public License for more details.
 
12
 
 
13
# You should have received a copy of the GNU Affero General Public License
 
14
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
"""
 
16
WSGI config for ticket_system project.
 
17
 
 
18
This module contains the WSGI application used by Django's development server
 
19
and any production WSGI deployments. It should expose a module-level variable
 
20
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
 
21
this application via the ``WSGI_APPLICATION`` setting.
 
22
 
 
23
Usually you will have the standard Django WSGI application here, but it also
 
24
might make sense to replace the whole Django WSGI application with a custom one
 
25
that later delegates to the Django one. For example, you could introduce WSGI
 
26
middleware here, or combine a Django application with an application of another
 
27
framework.
 
28
 
 
29
"""
 
30
import os
 
31
 
 
32
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
 
33
# if running multiple sites in the same mod_wsgi process. To fix this, use
 
34
# mod_wsgi daemon mode with each site in its own daemon process, or use
 
35
# os.environ["DJANGO_SETTINGS_MODULE"] = "ticket_system.settings"
 
36
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ticket_system.settings")
 
37
 
 
38
# This application object is used by any WSGI server configured to use this
 
39
# file. This includes Django's development server, if the WSGI_APPLICATION
 
40
# setting points here.
 
41
from django.core.wsgi import get_wsgi_application
 
42
application = get_wsgi_application()
 
43
 
 
44
# Apply WSGI middleware here.
 
45
# from helloworld.wsgi import HelloWorldApplication
 
46
# application = HelloWorldApplication(application)