From 79e3237986a8aa4af10c5275935cc73e94dc7348 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Tue, 3 Jun 2008 19:12:16 +0000 Subject: [PATCH] * initial checkin --- MANIFEST.in | 2 + README.txt | 19 +++ development.ini | 64 +++++++++++ docs/index.txt | 12 ++ .../paste_deploy_config.ini_tmpl | 58 ++++++++++ gnuviechadminweb.egg-info/paster_plugins.txt | 3 + gnuviechadminweb/__init__.py | 0 gnuviechadminweb/config/__init__.py | 0 gnuviechadminweb/config/environment.py | 33 ++++++ gnuviechadminweb/config/middleware.py | 57 +++++++++ gnuviechadminweb/config/routing.py | 24 ++++ gnuviechadminweb/controllers/__init__.py | 0 gnuviechadminweb/controllers/error.py | 41 +++++++ gnuviechadminweb/controllers/template.py | 27 +++++ gnuviechadminweb/lib/__init__.py | 0 gnuviechadminweb/lib/app_globals.py | 14 +++ gnuviechadminweb/lib/base.py | 27 +++++ gnuviechadminweb/lib/helpers.py | 6 + gnuviechadminweb/model/__init__.py | 0 gnuviechadminweb/public/index.html | 108 ++++++++++++++++++ gnuviechadminweb/tests/__init__.py | 40 +++++++ gnuviechadminweb/tests/functional/__init__.py | 0 gnuviechadminweb/tests/test_models.py | 0 gnuviechadminweb/websetup.py | 14 +++ setup.cfg | 59 ++++++++++ setup.py | 31 +++++ test.ini | 21 ++++ 27 files changed, 660 insertions(+) create mode 100644 MANIFEST.in create mode 100644 README.txt create mode 100644 development.ini create mode 100644 docs/index.txt create mode 100644 gnuviechadminweb.egg-info/paste_deploy_config.ini_tmpl create mode 100644 gnuviechadminweb.egg-info/paster_plugins.txt create mode 100644 gnuviechadminweb/__init__.py create mode 100644 gnuviechadminweb/config/__init__.py create mode 100644 gnuviechadminweb/config/environment.py create mode 100644 gnuviechadminweb/config/middleware.py create mode 100644 gnuviechadminweb/config/routing.py create mode 100644 gnuviechadminweb/controllers/__init__.py create mode 100644 gnuviechadminweb/controllers/error.py create mode 100644 gnuviechadminweb/controllers/template.py create mode 100644 gnuviechadminweb/lib/__init__.py create mode 100644 gnuviechadminweb/lib/app_globals.py create mode 100644 gnuviechadminweb/lib/base.py create mode 100644 gnuviechadminweb/lib/helpers.py create mode 100644 gnuviechadminweb/model/__init__.py create mode 100644 gnuviechadminweb/public/index.html create mode 100644 gnuviechadminweb/tests/__init__.py create mode 100644 gnuviechadminweb/tests/functional/__init__.py create mode 100644 gnuviechadminweb/tests/test_models.py create mode 100644 gnuviechadminweb/websetup.py create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 test.ini diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..9a5c22e --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +recursive-include gnuviechadminweb/public * +recursive-include gnuviechadminweb/templates * diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..d97259b --- /dev/null +++ b/README.txt @@ -0,0 +1,19 @@ +This file is for you to describe the gnuviechadminweb application. Typically +you would include information such as the information below: + +Installation and Setup +====================== + +Install ``gnuviechadminweb`` using easy_install:: + + easy_install gnuviechadminweb + +Make a config file as follows:: + + paster make-config gnuviechadminweb config.ini + +Tweak the config file as appropriate and then setup the application:: + + paster setup-app config.ini + +Then you are ready to go. diff --git a/development.ini b/development.ini new file mode 100644 index 0000000..c233af4 --- /dev/null +++ b/development.ini @@ -0,0 +1,64 @@ +# +# gnuviechadminweb - Pylons development environment configuration +# +# The %(here)s variable will be replaced with the parent directory of this file +# +[DEFAULT] +debug = true +# Uncomment and replace with the address which should receive any error reports +#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:gnuviechadminweb +full_stack = true +cache_dir = %(here)s/data +beaker.session.key = gnuviechadminweb +beaker.session.secret = somesecret + +# 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 + +# 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, gnuviechadminweb + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = INFO +handlers = console + +[logger_gnuviechadminweb] +level = DEBUG +handlers = +qualname = gnuviechadminweb + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s +datefmt = %H:%M:%S diff --git a/docs/index.txt b/docs/index.txt new file mode 100644 index 0000000..947acf6 --- /dev/null +++ b/docs/index.txt @@ -0,0 +1,12 @@ +gnuviechadminweb +++++++++++++++++ + +This is the main index page of your documentation. It should be written in +`reStructuredText format `_. + +You can generate your documentation in HTML format by running this command:: + + setup.py pudge + +For this to work you will need to download and install ``buildutils`` and +``pudge``. diff --git a/gnuviechadminweb.egg-info/paste_deploy_config.ini_tmpl b/gnuviechadminweb.egg-info/paste_deploy_config.ini_tmpl new file mode 100644 index 0000000..947adf4 --- /dev/null +++ b/gnuviechadminweb.egg-info/paste_deploy_config.ini_tmpl @@ -0,0 +1,58 @@ +# +# gnuviechadminweb - 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:gnuviechadminweb +full_stack = true +cache_dir = %(here)s/data +beaker.session.key = gnuviechadminweb +beaker.session.secret = ${app_instance_secret} +app_instance_uuid = ${app_instance_uuid} + +# 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 + +# 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] %(message)s diff --git a/gnuviechadminweb.egg-info/paster_plugins.txt b/gnuviechadminweb.egg-info/paster_plugins.txt new file mode 100644 index 0000000..b3ee8d7 --- /dev/null +++ b/gnuviechadminweb.egg-info/paster_plugins.txt @@ -0,0 +1,3 @@ +Pylons +WebHelpers +PasteScript diff --git a/gnuviechadminweb/__init__.py b/gnuviechadminweb/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gnuviechadminweb/config/__init__.py b/gnuviechadminweb/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gnuviechadminweb/config/environment.py b/gnuviechadminweb/config/environment.py new file mode 100644 index 0000000..86ba83c --- /dev/null +++ b/gnuviechadminweb/config/environment.py @@ -0,0 +1,33 @@ +"""Pylons environment configuration""" +import os + +from pylons import config + +import gnuviechadminweb.lib.app_globals as app_globals +import gnuviechadminweb.lib.helpers +from gnuviechadminweb.config.routing import make_map + +def load_environment(global_conf, app_conf): + """Configure the Pylons environment via the ``pylons.config`` + object + """ + # 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='gnuviechadminweb', + template_engine='mako', paths=paths) + + config['routes.map'] = make_map() + config['pylons.g'] = app_globals.Globals() + config['pylons.h'] = gnuviechadminweb.lib.helpers + + # Customize templating options via this variable + tmpl_options = config['buffet.template_options'] + + # CONFIGURATION OPTIONS HERE (note: all config options will override + # any Pylons config options) diff --git a/gnuviechadminweb/config/middleware.py b/gnuviechadminweb/config/middleware.py new file mode 100644 index 0000000..148c3b2 --- /dev/null +++ b/gnuviechadminweb/config/middleware.py @@ -0,0 +1,57 @@ +"""Pylons middleware initialization""" +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.error import error_template +from pylons.middleware import error_mapper, ErrorDocuments, ErrorHandler, \ + StaticJavascripts +from pylons.wsgiapp import PylonsApp + +from gnuviechadminweb.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. + + ``app_conf`` + The application's local configuration. Normally specified in the + [app:] section of the Paste ini file (where + defaults to main). + """ + # Configure the Pylons environment + load_environment(global_conf, app_conf) + + # The Pylons WSGI app + app = PylonsApp() + + # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares) + + if asbool(full_stack): + # Handle Python exceptions + app = ErrorHandler(app, global_conf, error_template=error_template, + **config['pylons.errorware']) + + # Display error documents for 401, 403, 404 status codes (and + # 500 when debug is disabled) + app = ErrorDocuments(app, global_conf, mapper=error_mapper, **app_conf) + + # Establish the Registry for this application + app = RegistryManager(app) + + # Static files + javascripts_app = StaticJavascripts() + static_app = StaticURLParser(config['pylons.paths']['static_files']) + app = Cascade([static_app, javascripts_app, app]) + return app diff --git a/gnuviechadminweb/config/routing.py b/gnuviechadminweb/config/routing.py new file mode 100644 index 0000000..af711a9 --- /dev/null +++ b/gnuviechadminweb/config/routing.py @@ -0,0 +1,24 @@ +"""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 pylons import config +from routes import Mapper + +def make_map(): + """Create, configure and return the routes Mapper""" + map = Mapper(directory=config['pylons.paths']['controllers'], + always_scan=config['debug']) + + # The ErrorController route (handles 404/500 error pages); it should + # likely stay at the top, ensuring it can always be resolved + map.connect('error/:action/:id', controller='error') + + # CUSTOM ROUTES HERE + + map.connect(':controller/:action/:id') + map.connect('*url', controller='template', action='view') + + return map diff --git a/gnuviechadminweb/controllers/__init__.py b/gnuviechadminweb/controllers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gnuviechadminweb/controllers/error.py b/gnuviechadminweb/controllers/error.py new file mode 100644 index 0000000..8651948 --- /dev/null +++ b/gnuviechadminweb/controllers/error.py @@ -0,0 +1,41 @@ +import cgi +import os.path + +from paste.urlparser import StaticURLParser +from pylons.middleware import error_document_template, media_path + +from gnuviechadminweb.lib.base import * + +class ErrorController(BaseController): + """Generates error documents as and when they are required. + + The ErrorDocuments middleware forwards to ErrorController when error + related status codes are returned from the application. + + This behaviour can be altered by changing the parameters to the + ErrorDocuments middleware in your config/middleware.py file. + + """ + def document(self): + """Render the error document""" + page = error_document_template % \ + dict(prefix=request.environ.get('SCRIPT_NAME', ''), + code=cgi.escape(request.params.get('code', '')), + message=cgi.escape(request.params.get('message', ''))) + return page + + def img(self, id): + """Serve Pylons' stock images""" + return self._serve_file(os.path.join(media_path, 'img'), id) + + def style(self, id): + """Serve Pylons' stock stylesheets""" + return self._serve_file(os.path.join(media_path, 'style'), id) + + def _serve_file(self, root, path): + """Call Paste's FileApp (a WSGI application) to serve the file + at the specified path + """ + static = StaticURLParser(root) + request.environ['PATH_INFO'] = '/%s' % path + return static(request.environ, self.start_response) diff --git a/gnuviechadminweb/controllers/template.py b/gnuviechadminweb/controllers/template.py new file mode 100644 index 0000000..0a78018 --- /dev/null +++ b/gnuviechadminweb/controllers/template.py @@ -0,0 +1,27 @@ +from gnuviechadminweb.lib.base import * + +class TemplateController(BaseController): + + def view(self, url): + """By default, the final controller tried to fulfill the request + when no other routes match. It may be used to display a template + when all else fails, e.g.:: + + def view(self, url): + return render('/%s' % url) + + Or if you're using Mako and want to explicitly send a 404 (Not + Found) response code when the requested template doesn't exist:: + + import mako.exceptions + + def view(self, url): + try: + return render('/%s' % url) + except mako.exceptions.TopLevelLookupException: + abort(404) + + By default this controller aborts the request with a 404 (Not + Found) + """ + abort(404) diff --git a/gnuviechadminweb/lib/__init__.py b/gnuviechadminweb/lib/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gnuviechadminweb/lib/app_globals.py b/gnuviechadminweb/lib/app_globals.py new file mode 100644 index 0000000..7f7585f --- /dev/null +++ b/gnuviechadminweb/lib/app_globals.py @@ -0,0 +1,14 @@ +"""The application's Globals object""" +from pylons import config + +class Globals(object): + """Globals acts as a container for objects available throughout the + life of the application + """ + + def __init__(self): + """One instance of Globals is created during application + initialization and is available during requests via the 'g' + variable + """ + pass diff --git a/gnuviechadminweb/lib/base.py b/gnuviechadminweb/lib/base.py new file mode 100644 index 0000000..509d315 --- /dev/null +++ b/gnuviechadminweb/lib/base.py @@ -0,0 +1,27 @@ +"""The base Controller API + +Provides the BaseController class for subclassing, and other objects +utilized by Controllers. +""" +from pylons import c, cache, config, g, request, response, session +from pylons.controllers import WSGIController +from pylons.controllers.util import abort, etag_cache, redirect_to +from pylons.decorators import jsonify, validate +from pylons.i18n import _, ungettext, N_ +from pylons.templating import render + +import gnuviechadminweb.lib.helpers as h +import gnuviechadminweb.model as model + +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'] + return WSGIController.__call__(self, environ, start_response) + +# Include the '_' function in the public names +__all__ = [__name for __name in locals().keys() if not __name.startswith('_') \ + or __name == '_'] diff --git a/gnuviechadminweb/lib/helpers.py b/gnuviechadminweb/lib/helpers.py new file mode 100644 index 0000000..0eb7c8f --- /dev/null +++ b/gnuviechadminweb/lib/helpers.py @@ -0,0 +1,6 @@ +"""Helper functions + +Consists of functions to typically be used within templates, but also +available to Controllers. This module is available to both as 'h'. +""" +from webhelpers import * diff --git a/gnuviechadminweb/model/__init__.py b/gnuviechadminweb/model/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gnuviechadminweb/public/index.html b/gnuviechadminweb/public/index.html new file mode 100644 index 0000000..ef0ec6b --- /dev/null +++ b/gnuviechadminweb/public/index.html @@ -0,0 +1,108 @@ + + + + Pylons Default Page + + + + +

Welcome to your Pylons Web Application

+ +

Weren't expecting to see this page?

+ +

The gnuviechadminweb/public/ directory is searched for static files + before your controllers are run. Remove this file (gnuviechadminweb/public/index.html) + and edit the routes in gnuviechadminweb/config/routing.py to point the + root path to a 'hello' controller we'll create below: +

 map.connect('', controller='hello', action='index')
+

+ +

Getting Started

+

You're now ready to start creating your own web application. To create a 'hello' controller, + run the following command in your project's root directory: +

+gnuviechadminweb$ paster controller hello
+
+ + This generates the following the following code in gnuviechadminweb/controllers/hello.py: +
+import logging
+
+from gnuviechadminweb.lib.base import *
+
+log = logging.getLogger(__name__)
+
+class HelloController(BaseController):
+
+    def index(self):
+        # Return a rendered template
+        #   return render('/some/template.mako)
+        # or, Return a response
+        return 'Hello World'
+
+

+

This controller simply prints out 'Hello World' to the browser. Pylons' default routes + automatically set up this controller to respond at the /hello URL. + With the additional route described above, this controller will also respond at the + root path. +

+ +

Using a template

+

To call a template and do something a little more complex, this following example + shows how to print out some request information from a + Mako template. +

+

Create a serverinfo.mako file in your project's gnuviechadminweb/templates/ + directory with the following contents: +

+
+<h2>
+Server info for ${request.host}
+</h2>
+
+<p>
+The URL you called: ${h.url_for()}
+</p>
+
+<p>
+The name you set: ${c.name}
+</p>
+
+<p>The WSGI environ:<br />
+<pre>${c.pretty_environ}</pre>
+</p>
+
+ +Then add the following to your 'hello' controller class: +
+    def serverinfo(self):
+        import cgi
+        import pprint
+        c.pretty_environ = cgi.escape(pprint.pformat(request.environ))
+        c.name = 'The Black Knight'
+        return render('/serverinfo.mako')
+
+ +You can now view the page at: /hello/serverinfo +

+ + diff --git a/gnuviechadminweb/tests/__init__.py b/gnuviechadminweb/tests/__init__.py new file mode 100644 index 0000000..91ff2e7 --- /dev/null +++ b/gnuviechadminweb/tests/__init__.py @@ -0,0 +1,40 @@ +"""Pylons application test package + +When the test runner finds and executes tests within this directory, +this file will be loaded to setup the test environment. + +It registers the root directory of the project in sys.path and +pkg_resources, in case the project hasn't been installed with +setuptools. It also initializes the application via websetup (paster +setup-app) with the project's test.ini configuration file. +""" +import os +import sys +from unittest import TestCase + +import pkg_resources +import paste.fixture +import paste.script.appinstall +from paste.deploy import loadapp +from routes import url_for + +__all__ = ['url_for', 'TestController'] + +here_dir = os.path.dirname(os.path.abspath(__file__)) +conf_dir = os.path.dirname(os.path.dirname(here_dir)) + +sys.path.insert(0, conf_dir) +pkg_resources.working_set.add_entry(conf_dir) +pkg_resources.require('Paste') +pkg_resources.require('PasteScript') + +test_file = os.path.join(conf_dir, 'test.ini') +cmd = paste.script.appinstall.SetupCommand('setup-app') +cmd.run([test_file]) + +class TestController(TestCase): + + def __init__(self, *args, **kwargs): + wsgiapp = loadapp('config:test.ini', relative_to=conf_dir) + self.app = paste.fixture.TestApp(wsgiapp) + TestCase.__init__(self, *args, **kwargs) diff --git a/gnuviechadminweb/tests/functional/__init__.py b/gnuviechadminweb/tests/functional/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gnuviechadminweb/tests/test_models.py b/gnuviechadminweb/tests/test_models.py new file mode 100644 index 0000000..e69de29 diff --git a/gnuviechadminweb/websetup.py b/gnuviechadminweb/websetup.py new file mode 100644 index 0000000..0748af1 --- /dev/null +++ b/gnuviechadminweb/websetup.py @@ -0,0 +1,14 @@ +"""Setup the gnuviechadminweb application""" +import logging + +from paste.deploy import appconfig +from pylons import config + +from gnuviechadminweb.config.environment import load_environment + +log = logging.getLogger(__name__) + +def setup_config(command, filename, section, vars): + """Place any commands to setup gnuviechadminweb here""" + conf = appconfig('config:' + filename) + load_environment(conf.global_conf, conf.local_conf) diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..cbb8286 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,59 @@ +[egg_info] +tag_build = dev +tag_svn_revision = true + +[easy_install] +find_links = http://www.pylonshq.com/download/ + +[pudge] +theme = pythonpaste.org + +# Add extra doc files here with spaces between them +docs = docs/index.txt + +# Doc Settings +doc_base = docs/ +dest = docs/html + +# Add extra modules here separated with commas +modules = gnuviechadminweb +title = Gnuviechadminweb +organization = Pylons + +# Highlight code-block sections with Pygments +highlighter = pygments + +# Optionally add extra links +#organization_url = http://pylonshq.com/ +#trac_url = http://pylonshq.com/project +settings = no_about=true + +# Optionally add extra settings +# link1=/community/ Community +# link2=/download/ Download + +[publish] +doc-dir=docs/html +make-dirs=1 + +# Babel configuration +[compile_catalog] +domain = gnuviechadminweb +directory = gnuviechadminweb/i18n +statistics = true + +[extract_messages] +add_comments = TRANSLATORS: +output_file = gnuviechadminweb/i18n/gnuviechadminweb.pot +width = 80 + +[init_catalog] +domain = gnuviechadminweb +input_file = gnuviechadminweb/i18n/gnuviechadminweb.pot +output_dir = gnuviechadminweb/i18n + +[update_catalog] +domain = gnuviechadminweb +input_file = gnuviechadminweb/i18n/gnuviechadminweb.pot +output_dir = gnuviechadminweb/i18n +previous = true diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..12d5225 --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +try: + from setuptools import setup, find_packages +except ImportError: + from ez_setup import use_setuptools + use_setuptools() + from setuptools import setup, find_packages + +setup( + name='gnuviechadminweb', + version="", + #description='', + #author='', + #author_email='', + #url='', + install_requires=["Pylons>=0.9.6.2"], + packages=find_packages(exclude=['ez_setup']), + include_package_data=True, + test_suite='nose.collector', + package_data={'gnuviechadminweb': ['i18n/*/LC_MESSAGES/*.mo']}, + #message_extractors = {'gnuviechadminweb': [ + # ('**.py', 'python', None), + # ('templates/**.mako', 'mako', None), + # ('public/**', 'ignore', None)]}, + entry_points=""" + [paste.app_factory] + main = gnuviechadminweb.config.middleware:make_app + + [paste.app_install] + main = pylons.util:PylonsInstaller + """, +) diff --git a/test.ini b/test.ini new file mode 100644 index 0000000..281e428 --- /dev/null +++ b/test.ini @@ -0,0 +1,21 @@ +# +# gnuviechadminweb - Pylons testing environment configuration +# +# The %(here)s variable will be replaced with the parent directory of this file +# +[DEFAULT] +debug = true +# Uncomment and replace with the address which should receive any error reports +#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 = config:development.ini + +# Add additional test specific configuration options as necessary.