]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
Delete unneeded files.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 27 Jul 2017 22:01:15 +0000 (22:01 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 27 Jul 2017 22:01:15 +0000 (22:01 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wradmin/trunk@2670 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wradmin/config/__init__.py [deleted file]
wradmin/config/deployment.ini_tmpl [deleted file]
wradmin/config/environment.py [deleted file]
wradmin/config/middleware.py [deleted file]
wradmin/lib/__init__.py [deleted file]
wradmin/lib/app_globals.py [deleted file]
wradmin/lib/base.py [deleted file]

diff --git a/wradmin/config/__init__.py b/wradmin/config/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/wradmin/config/deployment.ini_tmpl b/wradmin/config/deployment.ini_tmpl
deleted file mode 100644 (file)
index 2558be0..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# wradmin - Pylons configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-email_to = you@yourdomain.com
-smtp_server = localhost
-error_email_from = paste@localhost
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = egg:wradmin
-full_stack = true
-static_files = true
-
-cache_dir = %(here)s/data
-beaker.session.key = wradmin
-beaker.session.secret = ${app_instance_secret}
-app_instance_uuid = ${app_instance_uuid}
-
-authkit.setup.method = basic
-authkit.basic.realm = Winterrodeln Admin
-authkit.basic.authenticate.user.type = wradmin.lib.mediawiki:MediaWikiUsers
-authkit.basic.authenticate.user.data = 
-
-# If you'd like to fine-tune the individual locations of the cache data dirs
-# for the Cache data, or the Session saves, un-comment the desired settings
-# here:
-#beaker.cache.data_dir = %(here)s/data/cache
-#beaker.session.data_dir = %(here)s/data/sessions
-
-# SQLAlchemy database URL
-sqlalchemy.url = mysql://user@localhost:3306/winterrodeln_wiki?charset=utf8&use_unicode=0
-# If we would use "use_unicode=1" or omit the parameter (because its the default), sqlalchemy requests unicode strings from the MySQLdb backend (and does not do the conversion itself), however, since the tables are defined as 'varchar(x) binary' only binary strings are returned and not converted to unicode.
-
-# necessary for mySQL databases
-sqlalchemy.pool_recycle = 3600
-
-# 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
-
-[handlers]
-keys = console
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = console
-
-[handler_console]
-class = StreamHandler
-args = (sys.stderr,)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s
diff --git a/wradmin/config/environment.py b/wradmin/config/environment.py
deleted file mode 100644 (file)
index 7594302..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-"""Pylons environment configuration"""
-import os
-
-from genshi.template import TemplateLoader
-from pylons.configuration import PylonsConfig
-from sqlalchemy import engine_from_config
-
-import wradmin.lib.app_globals as app_globals
-import wradmin.lib.helpers
-from wradmin.config.routing import make_map
-from wradmin.model import init_model
-
-def load_environment(global_conf, app_conf):
-    """Configure the Pylons environment via the ``pylons.config``
-    object
-    """
-    config = PylonsConfig()
-    
-    # Pylons paths
-    root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-    paths = dict(root=root,
-                 controllers=os.path.join(root, 'controllers'),
-                 static_files=os.path.join(root, 'public'),
-                 templates=[os.path.join(root, 'templates')])
-
-    # Initialize config with the basic options
-    config.init_app(global_conf, app_conf, package='wradmin', paths=paths)
-
-    config['routes.map'] = make_map(config)
-    config['pylons.app_globals'] = app_globals.Globals(config)
-    config['pylons.h'] = wradmin.lib.helpers
-    
-    # Setup cache object as early as possible
-    import pylons
-    pylons.cache._push_object(config['pylons.app_globals'].cache)
-    
-
-    # Create the Genshi TemplateLoader
-    config['pylons.app_globals'].genshi_loader = TemplateLoader(
-        paths['templates'], auto_reload=True)
-
-    # Setup the SQLAlchemy database engine
-    engine = engine_from_config(config, 'sqlalchemy.')
-    init_model(engine)
-
-    # CONFIGURATION OPTIONS HERE (note: all config options will override
-    # any Pylons config options)
-    
-    return config
diff --git a/wradmin/config/middleware.py b/wradmin/config/middleware.py
deleted file mode 100644 (file)
index cc2ccb3..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-"""Pylons middleware initialization"""
-from beaker.middleware import SessionMiddleware
-from paste.cascade import Cascade
-from paste.registry import RegistryManager
-from paste.urlparser import StaticURLParser
-from paste.deploy.converters import asbool
-from pylons.middleware import ErrorHandler, StatusCodeRedirect
-from pylons.wsgiapp import PylonsApp
-from routes.middleware import RoutesMiddleware
-
-from wradmin.config.environment import load_environment
-
-import authkit.authenticate
-from authkit.permissions import ValidAuthKitUser
-
-def make_app(global_conf, full_stack=True, static_files=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 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.
-
-    ``static_files``
-        Whether this application serves its own static files; disable
-        when another web server is responsible for serving them.
-
-    ``app_conf``
-        The application's local configuration. Normally specified in
-        the [app:<name>] section of the Paste ini file (where <name>
-        defaults to main).
-
-    """
-    # Configure the Pylons environment
-    config = load_environment(global_conf, app_conf)
-
-    # The Pylons WSGI app
-    app = PylonsApp(config=config)
-
-    # Routing/Session Middleware
-    app = RoutesMiddleware(app, config['routes.map'])
-    app = SessionMiddleware(app, config)
-
-    # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
-
-    if asbool(full_stack):
-        # Handle Python exceptions
-        app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
-        
-        # Authorization (not in debug mode)
-        if not config['debug']:
-            permission = ValidAuthKitUser()
-            app = authkit.authorize.middleware(app, permission)
-            app = authkit.authenticate.middleware(app, app_conf)
-
-        # Display error documents for 401, 403, 404 status codes (and
-        # 500 when debug is disabled)
-        if asbool(config['debug']):
-            app = StatusCodeRedirect(app)
-        else:
-            app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
-
-    # Establish the Registry for this application
-    app = RegistryManager(app)
-
-    if asbool(static_files):
-        # Serve static files
-        static_app = StaticURLParser(config['pylons.paths']['static_files'])
-        app = Cascade([static_app, app])
-    app.config = config
-    return app
diff --git a/wradmin/lib/__init__.py b/wradmin/lib/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/wradmin/lib/app_globals.py b/wradmin/lib/app_globals.py
deleted file mode 100644 (file)
index 2366bba..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-"""The application's Globals object"""
-
-from beaker.cache import CacheManager
-from beaker.util import parse_cache_config_options
-
-class Globals(object):
-
-    """Globals acts as a container for objects available throughout the
-    life of the application
-
-    """
-
-    def __init__(self, config):
-        """One instance of Globals is created during application
-        initialization and is available during requests via the
-        'app_globals' variable
-
-        """
-        self.cache = CacheManager(**parse_cache_config_options(config))
diff --git a/wradmin/lib/base.py b/wradmin/lib/base.py
deleted file mode 100644 (file)
index 13647d2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-"""The base Controller API
-
-Provides the BaseController class for subclassing.
-"""
-from pylons.controllers import WSGIController
-from pylons.templating import render_genshi as render
-
-from wradmin.model.meta import Session
-
-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:
-            Session.remove()