Skip to content

Commit

Permalink
rm files, move postload hook
Browse files Browse the repository at this point in the history
bzr revid: al@openerp.com-20121006171053-qggp1r5263h7v7vd
  • Loading branch information
antonylesuisse committed Oct 6, 2012
1 parent 55bcd97 commit bc3cf0b
Show file tree
Hide file tree
Showing 36 changed files with 27 additions and 1,004 deletions.
661 changes: 0 additions & 661 deletions LICENSE.web

This file was deleted.

34 changes: 0 additions & 34 deletions Makefile

This file was deleted.

9 changes: 0 additions & 9 deletions README.web

This file was deleted.

33 changes: 3 additions & 30 deletions addons/web/__init__.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,4 @@
import logging

from . import common
from . import controllers

_logger = logging.getLogger(__name__)

class Options(object):
pass

def wsgi_postload():
import openerp
import os
import tempfile
import getpass
_logger.info("embedded mode")
o = Options()
o.dbfilter = openerp.tools.config['dbfilter']
o.server_wide_modules = openerp.conf.server_wide_modules or ['web']
try:
username = getpass.getuser()
except Exception:
username = "unknown"
o.session_storage = os.path.join(tempfile.gettempdir(), "oe-sessions-" + username)
o.addons_path = openerp.modules.module.ad_paths
o.serve_static = True
o.backend = 'local'

app = common.http.Root(o)
openerp.wsgi.register_wsgi_handler(app)
import common
import controllers

wsgi_postload = common.http.wsgi_postload
24 changes: 24 additions & 0 deletions addons/web/common/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,4 +579,28 @@ def find_handler(self, *l):
ps = '/'
return None

class Options(object):
pass

def wsgi_postload():
import openerp
import tempfile
import getpass
_logger.info("embedded mode")
o = Options()
o.dbfilter = openerp.tools.config['dbfilter']
o.server_wide_modules = openerp.conf.server_wide_modules or ['web']
try:
username = getpass.getuser()
except Exception:
username = "unknown"
o.session_storage = os.path.join(tempfile.gettempdir(), "oe-sessions-" + username)
o.addons_path = openerp.modules.module.ad_paths
o.serve_static = True
o.backend = 'local'

app = Root(o)
openerp.wsgi.register_wsgi_handler(app)


# vim:et:ts=4:sw=4:
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 0 additions & 27 deletions logging.json

This file was deleted.

116 changes: 0 additions & 116 deletions openerp-web

This file was deleted.

3 changes: 0 additions & 3 deletions openerp-web.cfg

This file was deleted.

124 changes: 0 additions & 124 deletions setup.py

This file was deleted.

0 comments on commit bc3cf0b

Please sign in to comment.