switch from ddportfolio to debianmemberportfolio

- change all references from ddportfolio to debianmemberportfolio
- rename debianmemberportfolio.controllers.DDPortfolioController to
  debianmemberportfolio.controllers.Controller
- update documentation
- update copyright years, unify file header formatting
This commit is contained in:
Jan Dittberner 2014-02-08 23:54:51 +01:00
parent 780e10494e
commit b670f58c7a
45 changed files with 1217 additions and 1123 deletions

View file

@ -1,22 +1,22 @@
# -*- python -*-
# -*- coding: utf-8 -*-
#
# DDPortfolio service config package
# Copyright © 2009, 2010 Jan Dittberner <jan@dittberner.info>
# Debian Member Portfolio Service config package
#
# This file is part of DDPortfolio service.
# Copyright © 2009-2014 Jan Dittberner <jan@dittberner.info>
#
# DDPortfolio service is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# This file is part of the Debian Member Portfolio Service.
#
# DDPortfolio service is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Affero General Public License for more details.
# Debian Member Portfolio Service is free software: you can redistribute it
# and/or modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see
# <http://www.gnu.org/licenses/>.
# Debian Member Portfolio Service is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
# General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

View file

@ -1,5 +1,5 @@
#
# ddportfolioservice - Pylons configuration
# Debian Member Portfolio Service - Pylons configuration
#
# The %(here)s variable will be replaced with the parent directory of this file
#
@ -15,12 +15,12 @@ host = 0.0.0.0
port = 5000
[app:main]
use = egg:ddportfolioservice
use = egg:debianmemberportfolio
full_stack = true
static_files = true
cache_dir = %(here)s/data
beaker.session.key = ddportfolioservice
beaker.session.key = debianmemberportfolio
beaker.session.secret = ${app_instance_secret}
app_instance_uuid = ${app_instance_uuid}

View file

@ -1,40 +1,44 @@
# -*- python -*-
# -*- coding: utf-8 -*-
#
# DDPortfolio service environment configuration
# Copyright © 2009, 2010, 2011, 2012 Jan Dittberner <jan@dittberner.info>
# Debian Member Portfolio Service environment configuration
#
# This file is part of DDPortfolio service.
# Copyright © 2009-2014 Jan Dittberner <jan@dittberner.info>
#
# DDPortfolio service is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# This file is part of the Debian Member Portfolio Service.
#
# DDPortfolio service is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Affero General Public License for more details.
# Debian Member Portfolio Service is free software: you can redistribute it
# and/or modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see
# <http://www.gnu.org/licenses/>.
# Debian Member Portfolio Service is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
# General Public License for more details.
#
"""Pylons environment configuration"""
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Pylons environment configuration
"""
import os
from mako.lookup import TemplateLookup
from pylons.configuration import PylonsConfig
from pylons.error import handle_mako_error
import ddportfolioservice.lib.app_globals as app_globals
import ddportfolioservice.lib.helpers
from ddportfolioservice.config.routing import make_map
import debianmemberportfolio.lib.app_globals as app_globals
import debianmemberportfolio.lib.helpers
from debianmemberportfolio.config.routing import make_map
def load_environment(global_conf, app_conf):
"""
Configure the Pylons environment via the ``pylons.config`` object
Configures the Pylons environment via the ``pylons.config`` object.
"""
config = PylonsConfig()
@ -47,11 +51,11 @@ def load_environment(global_conf, app_conf):
# Initialize config with the basic options
config.init_app(
global_conf, app_conf, package='ddportfolioservice', paths=paths)
global_conf, app_conf, package='debianmemberportfolio', paths=paths)
config['routes.map'] = make_map(config)
config['pylons.app_globals'] = app_globals.Globals(config)
config['pylons.h'] = ddportfolioservice.lib.helpers
config['pylons.h'] = debianmemberportfolio.lib.helpers
# Setup cache object as early as possible
import pylons

View file

@ -1,26 +1,30 @@
# -*- python -*-
# -*- coding: utf-8 -*-
#
# DDPortfolio service middleware configuration
# Copyright © 2009, 2010, 2011, 2012 Jan Dittberner <jan@dittberner.info>
# Debian Member Portfolio Service middleware configuration
#
# This file is part of DDPortfolio service.
# Copyright © 2009-2014 Jan Dittberner <jan@dittberner.info>
#
# DDPortfolio service is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# This file is part of the Debian Member Portfolio Service.
#
# DDPortfolio service is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Affero General Public License for more details.
# Debian Member Portfolio Service is free software: you can redistribute it
# and/or modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see
# <http://www.gnu.org/licenses/>.
# Debian Member Portfolio Service is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
# General Public License for more details.
#
"""Pylons middleware initialization"""
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Pylons middleware initialization
"""
from beaker.middleware import SessionMiddleware
from paste.cascade import Cascade
from paste.registry import RegistryManager
@ -30,11 +34,12 @@ from pylons.middleware import ErrorHandler, StatusCodeRedirect
from pylons.wsgiapp import PylonsApp
from routes.middleware import RoutesMiddleware
from ddportfolioservice.config.environment import load_environment
from debianmemberportfolio.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
"""
Create a Pylons WSGI application and return it
``global_conf``
The inherited configuration for this application. Normally from

View file

@ -1,36 +1,42 @@
# -*- python -*-
# -*- coding: utf-8 -*-
#
# DDPortfolio service routing configuration
# Copyright © 2009, 2010, 2011, 2012 Jan Dittberner <jan@dittberner.info>
# Debian Member Portfolio Service routing configuration
#
# This file is part of DDPortfolio service.
# Copyright © 2009-2014 Jan Dittberner <jan@dittberner.info>
#
# DDPortfolio service is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# This file is part of the Debian Member Portfolio Service.
#
# DDPortfolio service is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Affero General Public License for more details.
# Debian Member Portfolio Service is free software: you can redistribute it
# and/or modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see
# <http://www.gnu.org/licenses/>.
# Debian Member Portfolio Service is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
# General Public License for more details.
#
"""Routes configuration
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Routes configuration
The more specific and detailed routes should be defined first so they
may take precedent over the more generic routes. For more information
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"""
"""
Create, configure and return the routes Mapper
"""
map = Mapper(directory=config['pylons.paths']['controllers'],
always_scan=config['debug'], explicit=True)
map.minimization = False
@ -41,8 +47,8 @@ def make_map(config):
map.connect('/error/{action}/{id}', controller='error')
# CUSTOM ROUTES HERE
map.connect('/', controller='ddportfolio', action='index')
map.connect('/result', controller='ddportfolio', action='urllist')
map.connect('/', controller='portfolio', action='index')
map.connect('/result', controller='portfolio', action='urllist')
map.connect('/htmlformhelper.js', controller='showformscripts',
action='index')