Dénote

Dénote Git Source Tree

Root/denote/wsgi.py

1# -*- coding: utf-8 -*-
2"""
3WSGI config for denote project.
4
5This module contains the WSGI application used by Django's development server
6and any production WSGI deployments. It should expose a module-level variable
7named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
8this application via the ``WSGI_APPLICATION`` setting.
9
10Usually you will have the standard Django WSGI application here, but it also
11might make sense to replace the whole Django WSGI application with a custom one
12that later delegates to the Django one. For example, you could introduce WSGI
13middleware here, or combine a Django application with an application of another
14framework.
15
16"""
17
18import os
19import sys
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"] = "denote.settings"
25os.environ.setdefault("DJANGO_SETTINGS_MODULE", "denote.settings")
26
27denote_root = '/home/soutade/www/denote/denote/'
28if denote_root not in sys.path:
29 sys.path.append(denote_root)
30denote_root += 'denote/'
31os.environ.setdefault("DENOTE_ROOT", denote_root)
32
33# This application object is used by any WSGI server configured to use this
34# file. This includes Django's development server, if the WSGI_APPLICATION
35# setting points here.
36from django.core.wsgi import get_wsgi_application
37application = get_wsgi_application()
38
39# Apply WSGI middleware here.
40# from helloworld.wsgi import HelloWorldApplication
41# application = HelloWorldApplication(application)

Archive Download this file

Branches

Tags