Changeset - 436bee78d81a
[Not reviewed]
default
0 4 0
Marcin Kuzminski - 16 years ago 2010-02-27 17:28:25

Litle code cleanups, This version handles repos correctly.
4 files changed with 5 insertions and 15 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -17,47 +17,47 @@ debug = true
 
#smtp_username = 
 
#smtp_password = 
 
#error_message = 'mercurial crash !'
 

	
 
[server:main]
 
use = egg:Paste#http
 
host = 127.0.0.1
 
port = 5000
 

	
 
[app:main]
 
use = egg:pylons_app
 
full_stack = true
 
static_files = true
 
static_files = false
 
lang=en
 
cache_dir = %(here)s/data
 

	
 
################################################################################
 
## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*  ##
 
## Debug mode will enable the interactive debugging tool, allowing ANYONE to  ##
 
## execute malicious code after an exception is raised.                       ##
 
################################################################################
 
#set debug = false
 

	
 

	
 
################################
 
### LOGGING CONFIGURATION   ####
 
################################
 
[loggers]
 
keys = root, routes, pylons_app, sqlalchemy
 

	
 
[handlers]
 
keys = console,chainsaw
 
keys = console
 

	
 
[formatters]
 
keys = generic,xmllayout
 
keys = generic
 

	
 
#############
 
## LOGGERS ##
 
#############
 
[logger_root]
 
level = NOTSET
 
handlers = console
 

	
 
[logger_routes]
 
level = INFO
 
handlers = console
 
qualname = routes.middleware
 
@@ -75,29 +75,20 @@ handlers = console
 
qualname = sqlalchemy.engine
 

	
 
##############
 
## HANDLERS ##
 
##############
 

	
 
[handler_console]
 
class = StreamHandler
 
args = (sys.stderr,)
 
level = NOTSET
 
formatter = generic
 

	
 
[handler_chainsaw]
 
class = xmllayout.RawSocketHandler
 
args = ('localhost', 4448)
 
level = NOTSET
 
formatter = xmllayout
 

	
 
################
 
## FORMATTERS ##
 
################
 

	
 
[formatter_generic]
 
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %H:%M:%S
 

	
 
[formatter_xmllayout]
 
class = xmllayout.XMLLayout
 

	
production.ini
Show inline comments
 
@@ -17,25 +17,25 @@ debug = true
 
#smtp_username = 
 
#smtp_password = 
 
#error_message = 'mercurial crash !'
 

	
 
[server:main]
 
use = egg:Paste#http
 
host = 127.0.0.1
 
port = 8001
 

	
 
[app:main]
 
use = egg:pylons_app
 
full_stack = true
 
static_files = true
 
static_files = false
 
lang=en
 
cache_dir = %(here)s/data
 

	
 
################################################################################
 
## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*  ##
 
## Debug mode will enable the interactive debugging tool, allowing ANYONE to  ##
 
## execute malicious code after an exception is raised.                       ##
 
################################################################################
 
#set debug = false
 

	
 
################################
 
### LOGGING CONFIGURATION   ####
pylons_app/config/middleware.py
Show inline comments
 
"""Pylons middleware initialization"""
 
from beaker.middleware import CacheMiddleware, SessionMiddleware
 
from paste.cascade import Cascade
 
from paste.registry import RegistryManager
 
from paste.urlparser import StaticURLParser
 
from paste.deploy.converters import asbool
 
from pylons import config
 
from pylons.middleware import ErrorHandler, StatusCodeRedirect
 
from pylons.wsgiapp import PylonsApp
 
from routes.middleware import RoutesMiddleware
 

	
 
from pylons_app.config.environment import load_environment
 

	
 

	
 

	
 
def make_app(global_conf, full_stack = True, **app_conf):
 
    """Create a Pylons WSGI application and return it
 

	
 
    ``global_conf``
 
        The inherited configuration for this application. Normally from
 
        the [DEFAULT] section of the Paste ini file.
 

	
 
    ``full_stack``
 
        Whether or not this application provides a full WSGI stack (by
 
        default, meaning it handles its own exceptions and errors).
 
        Disable full_stack when this application is "managed" by
 
        another WSGI middleware.
pylons_app/lib/base.py
Show inline comments
 
@@ -8,13 +8,12 @@ from pylons_app.model import meta
 

	
 
class BaseController(WSGIController):
 

	
 
    def __call__(self, environ, start_response):
 
        """Invoke the Controller"""
 
        # WSGIController.__call__ dispatches to the Controller method
 
        # the request is routed to. This routing information is
 
        # available in environ['pylons.routes_dict']
 
        try:
 
            return WSGIController.__call__(self, environ, start_response)
 
        finally:
 
            pass
 
            #meta.Session.remove()
0 comments (0 inline, 0 general)