mainqndtest
v1.1.1
Last change
on this file since 42095c5 was
42bd667,
checked in by David Fuertes <dfuertes@…>, 4 years ago
|
Historial Limpio
|
-
Property mode set to
100755
|
File size:
937 bytes
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | # -*- coding: utf-8 -*- |
---|
3 | |
---|
4 | """ |
---|
5 | This file is part of the web2py Web Framework |
---|
6 | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> |
---|
7 | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) |
---|
8 | |
---|
9 | |
---|
10 | This is a WSGI handler |
---|
11 | """ |
---|
12 | |
---|
13 | import sys |
---|
14 | import os |
---|
15 | |
---|
16 | # change these parameters as required |
---|
17 | LOGGING = False |
---|
18 | SOFTCRON = False |
---|
19 | |
---|
20 | |
---|
21 | path = os.path.dirname(os.path.abspath(__file__)) |
---|
22 | os.chdir(path) |
---|
23 | |
---|
24 | if not os.path.isdir('applications'): |
---|
25 | raise RuntimeError('Running from the wrong folder') |
---|
26 | |
---|
27 | sys.path = [path] + [p for p in sys.path if not p == path] |
---|
28 | |
---|
29 | import gluon.main |
---|
30 | |
---|
31 | if LOGGING: |
---|
32 | application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase, |
---|
33 | logfilename='httpserver.log', |
---|
34 | profiler_dir=None) |
---|
35 | else: |
---|
36 | application = gluon.main.wsgibase |
---|
37 | |
---|
38 | if SOFTCRON: |
---|
39 | from gluon.settings import global_settings |
---|
40 | global_settings.web2py_crontype = 'soft' |
---|
Note: See
TracBrowser
for help on using the repository browser.