source: OpenRLabs-Git/deploy/rlabs-docker/web2py-rlabs/wsgihandler.py @ 42095c5

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"""
5This file is part of the web2py Web Framework
6Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
7License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
8
9
10This is a WSGI handler
11"""
12
13import sys
14import os
15
16# change these parameters as required
17LOGGING = False
18SOFTCRON = False
19
20
21path = os.path.dirname(os.path.abspath(__file__))
22os.chdir(path)
23
24if not os.path.isdir('applications'):
25    raise RuntimeError('Running from the wrong folder')
26
27sys.path = [path] + [p for p in sys.path if not p == path]
28
29import gluon.main
30
31if LOGGING:
32    application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
33                                        logfilename='httpserver.log',
34                                        profiler_dir=None)
35else:
36    application = gluon.main.wsgibase
37
38if SOFTCRON:
39    from gluon.settings import global_settings
40    global_settings.web2py_crontype = 'soft'
Note: See TracBrowser for help on using the repository browser.