forked from imwilsonxu/fbone
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.wsgi
More file actions
29 lines (21 loc) · 693 Bytes
/
app.wsgi
File metadata and controls
29 lines (21 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-
"""
wsgi
~~~~
Deploy with apache2 wsgi.
"""
import sys, os, pwd
project = "fbone"
# specify dev/production config
os.environ['%s_APP_CONFIG' % project.upper()] = ''
# http://code.google.com/p/modwsgi/wiki/ApplicationIssues#User_HOME_Environment_Variable
os.environ['HOME'] = pwd.getpwuid(os.getuid()).pw_dir
BASE_DIR = os.path.join(os.path.dirname(__file__))
# activate virtualenv
activate_this = os.path.join(BASE_DIR, "env/bin/activate_this.py")
execfile(activate_this, dict(__file__=activate_this))
#if BASE_DIR not in sys.path:
#sys.path.append(BASE_DIR)
# give wsgi the "application"
from fbone import create_app
application = create_app()