forked from jan/debianmemberportfolio
PEP-8 compliance
- fix all PEP-8 warnings - bump copyright years
This commit is contained in:
parent
e643987d3d
commit
6224abdf63
16 changed files with 164 additions and 128 deletions
|
@ -2,7 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# DDPortfolio service environment configuration
|
||||
# Copyright © 2009, 2010 Jan Dittberner <jan@dittberner.info>
|
||||
# Copyright © 2009, 2010, 2011, 2012 Jan Dittberner <jan@dittberner.info>
|
||||
#
|
||||
# This file is part of DDPortfolio service.
|
||||
#
|
||||
|
@ -31,9 +31,10 @@ import ddportfolioservice.lib.app_globals as app_globals
|
|||
import ddportfolioservice.lib.helpers
|
||||
from ddportfolioservice.config.routing import make_map
|
||||
|
||||
|
||||
def load_environment(global_conf, app_conf):
|
||||
"""Configure the Pylons environment via the ``pylons.config``
|
||||
object
|
||||
"""
|
||||
Configure the Pylons environment via the ``pylons.config`` object
|
||||
"""
|
||||
config = PylonsConfig()
|
||||
|
||||
|
@ -45,7 +46,8 @@ def load_environment(global_conf, app_conf):
|
|||
templates=[os.path.join(root, 'templates')])
|
||||
|
||||
# Initialize config with the basic options
|
||||
config.init_app(global_conf, app_conf, package='ddportfolioservice', paths=paths)
|
||||
config.init_app(
|
||||
global_conf, app_conf, package='ddportfolioservice', paths=paths)
|
||||
|
||||
config['routes.map'] = make_map(config)
|
||||
config['pylons.app_globals'] = app_globals.Globals(config)
|
||||
|
@ -54,7 +56,6 @@ def load_environment(global_conf, app_conf):
|
|||
# Setup cache object as early as possible
|
||||
import pylons
|
||||
pylons.cache._push_object(config['pylons.app_globals'].cache)
|
||||
|
||||
|
||||
# Create the Mako TemplateLookup, with the default auto-escaping
|
||||
config['pylons.app_globals'].mako_lookup = TemplateLookup(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# DDPortfolio service middleware configuration
|
||||
# Copyright © 2009, 2010 Jan Dittberner <jan@dittberner.info>
|
||||
# Copyright © 2009, 2010, 2011, 2012 Jan Dittberner <jan@dittberner.info>
|
||||
#
|
||||
# This file is part of DDPortfolio service.
|
||||
#
|
||||
|
@ -32,6 +32,7 @@ from routes.middleware import RoutesMiddleware
|
|||
|
||||
from ddportfolioservice.config.environment import load_environment
|
||||
|
||||
|
||||
def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
|
||||
"""Create a Pylons WSGI application and return it
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# DDPortfolio service routing configuration
|
||||
# Copyright © 2009, 2010 Jan Dittberner <jan@dittberner.info>
|
||||
# Copyright © 2009, 2010, 2011, 2012 Jan Dittberner <jan@dittberner.info>
|
||||
#
|
||||
# This file is part of DDPortfolio service.
|
||||
#
|
||||
|
@ -28,6 +28,7 @@ refer to the routes manual at http://routes.groovie.org/docs/
|
|||
"""
|
||||
from routes import Mapper
|
||||
|
||||
|
||||
def make_map(config):
|
||||
"""Create, configure and return the routes Mapper"""
|
||||
map = Mapper(directory=config['pylons.paths']['controllers'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue