Changeset 1:21527272c96b
- Timestamp:
- 12/27/07 13:44:38 (3 years ago)
- Branch:
- default
- convert_revision:
- svn:10edda23-d834-0410-9182-b00384516d49/trunk@2
- Files:
-
- 6 added
- 8 removed
- 16 modified
-
MANIFEST.in (added)
-
README.txt (added)
-
development.ini (modified) (3 diffs)
-
docs/index.txt (added)
-
microfacts.egg-info/paste_deploy_config.ini_tmpl (added)
-
microfacts/__init__.py (modified) (1 diff)
-
microfacts/config/__init__.py (modified) (1 diff)
-
microfacts/config/environment.py (modified) (1 diff)
-
microfacts/config/middleware.py (modified) (1 diff)
-
microfacts/config/routing.py (modified) (1 diff)
-
microfacts/controllers/error.py (modified) (1 diff)
-
microfacts/controllers/template.py (modified) (1 diff)
-
microfacts/docs/index.txt (deleted)
-
microfacts/i18n/__init__.py (deleted)
-
microfacts/lib/app_globals.py (modified) (1 diff)
-
microfacts/lib/base.py (modified) (1 diff)
-
microfacts/lib/database.py (deleted)
-
microfacts/lib/helpers.py (modified) (1 diff)
-
microfacts/model/__init__.py (added)
-
microfacts/models/__init__.py (deleted)
-
microfacts/models/microfact.py (deleted)
-
microfacts/public/index.html (modified) (1 diff)
-
microfacts/templates/autohandler (deleted)
-
microfacts/tests/__init__.py (modified) (3 diffs)
-
microfacts/tests/models/__init__.py (deleted)
-
microfacts/tests/models/test_microfact.py (deleted)
-
microfacts/websetup.py (modified) (1 diff)
-
setup.cfg (added)
-
setup.py (modified) (1 diff)
-
test.ini (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
development.ini
r0 r1 6 6 [DEFAULT] 7 7 debug = true 8 email_to = you@yourdomain.com 8 # Uncomment and replace with the address which should receive any error reports 9 #email_to = you@yourdomain.com 9 10 smtp_server = localhost 10 11 error_email_from = paste@localhost … … 17 18 [app:main] 18 19 use = egg:microfacts 20 full_stack = true 19 21 cache_dir = %(here)s/data 20 session_key = microfacts21 session_secret = somesecret22 beaker.session.key = microfacts 23 beaker.session.secret = somesecret 22 24 23 25 # If you'd like to fine-tune the individual locations of the cache data dirs 24 # for Myghty, the Cache data, or the Session saves, un-comment the desired 25 # settings here: 26 #myghty_data_dir = %(here)s/data/templates 27 #cache_data_dir = %(here)s/data/cache 28 #session_data_dir = %(here)s/data/sessions 29 30 # sqlalchemy db 31 sqlalchemy.dburi = sqlite:///%(here)s/microfacts_development.db 26 # for the Cache data, or the Session saves, un-comment the desired settings 27 # here: 28 #beaker.cache.data_dir = %(here)s/data/cache 29 #beaker.session.data_dir = %(here)s/data/sessions 32 30 33 31 # WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* … … 35 33 # execute malicious code after an exception is raised. 36 34 #set debug = false 35 36 37 # Logging configuration 38 [loggers] 39 keys = root, microfacts 40 41 [handlers] 42 keys = console 43 44 [formatters] 45 keys = generic 46 47 [logger_root] 48 level = INFO 49 handlers = console 50 51 [logger_microfacts] 52 level = DEBUG 53 handlers = 54 qualname = microfacts 55 56 [handler_console] 57 class = StreamHandler 58 args = (sys.stderr,) 59 level = NOTSET 60 formatter = generic 61 62 [formatter_generic] 63 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s 64 datefmt = %H:%M:%S -
microfacts/__init__.py
r0 r1 1 """2 microfacts3 4 This file loads the finished app from microfacts.config.middleware.5 6 """7 8 from microfacts.config.middleware import make_app -
microfacts/config/__init__.py
r0 r1 1 # -
microfacts/config/environment.py
r0 r1 1 """Pylons environment configuration""" 1 2 import os 2 3 3 import pylons.config 4 import webhelpers 4 from pylons import config 5 5 6 import microfacts.lib.app_globals as app_globals 7 import microfacts.lib.helpers 6 8 from microfacts.config.routing import make_map 7 9 8 def load_environment(global_conf={}, app_conf={}): 9 map = make_map(global_conf, app_conf) 10 # Setup our paths 11 root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 12 paths = {'root_path': root_path, 13 'controllers': os.path.join(root_path, 'controllers'), 14 'templates': [os.path.join(root_path, path) for path in \ 15 ('components', 'templates')], 16 'static_files': os.path.join(root_path, 'public') 17 } 18 19 # The following template options are passed to your template engines 20 tmpl_options = {} 21 tmpl_options['myghty.log_errors'] = True 22 tmpl_options['myghty.escapes'] = dict(l=webhelpers.auto_link, s=webhelpers.simple_format) 23 24 # Add your own template options config options here, note that all config options will override 25 # any Pylons config options 26 27 # Return our loaded config object 28 return pylons.config.Config(tmpl_options, map, paths) 10 def load_environment(global_conf, app_conf): 11 """Configure the Pylons environment via the ``pylons.config`` 12 object 13 """ 14 # Pylons paths 15 root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 16 paths = dict(root=root, 17 controllers=os.path.join(root, 'controllers'), 18 static_files=os.path.join(root, 'public'), 19 templates=[os.path.join(root, 'templates')]) 20 21 # Initialize config with the basic options 22 config.init_app(global_conf, app_conf, package='microfacts', 23 template_engine='genshi', paths=paths) 24 25 config['routes.map'] = make_map() 26 config['pylons.g'] = app_globals.Globals() 27 config['pylons.h'] = microfacts.lib.helpers 28 29 # Customize templating options via this variable 30 tmpl_options = config['buffet.template_options'] 31 32 # CONFIGURATION OPTIONS HERE (note: all config options will override 33 # any Pylons config options) -
microfacts/config/middleware.py
r0 r1 1 from paste import httpexceptions 1 """Pylons middleware initialization""" 2 2 from paste.cascade import Cascade 3 from paste.registry import RegistryManager 3 4 from paste.urlparser import StaticURLParser 4 from paste.registry import RegistryManager5 from paste.deploy.config import ConfigMiddleware, CONFIG6 5 from paste.deploy.converters import asbool 7 6 7 from pylons import config 8 8 from pylons.error import error_template 9 from pylons.middleware import ErrorHandler, ErrorDocuments, StaticJavascripts, error_mapper 10 import pylons.wsgiapp 9 from pylons.middleware import error_mapper, ErrorDocuments, ErrorHandler, \ 10 StaticJavascripts 11 from pylons.wsgiapp import PylonsApp 11 12 12 13 from microfacts.config.environment import load_environment 13 import microfacts.lib.helpers14 import microfacts.lib.app_globals as app_globals15 14 16 15 def make_app(global_conf, full_stack=True, **app_conf): 17 """Create a WSGI application and return it 18 19 global_conf is a dict representing the Paste configuration options, the 20 paste.deploy.converters should be used when parsing Paste config options 21 to ensure they're treated properly. 22 16 """Create a Pylons WSGI application and return it 17 18 ``global_conf`` 19 The inherited configuration for this application. Normally from 20 the [DEFAULT] section of the Paste ini file. 21 22 ``full_stack`` 23 Whether or not this application provides a full WSGI stack (by 24 default, meaning it handles its own exceptions and errors). 25 Disable full_stack when this application is "managed" by 26 another WSGI middleware. 27 28 ``app_conf`` 29 The application's local configuration. Normally specified in the 30 [app:<name>] section of the Paste ini file (where <name> 31 defaults to main). 23 32 """ 24 # Setup the Paste CONFIG object 25 CONFIG.push_process_config({'app_conf': app_conf, 26 'global_conf': global_conf}) 33 # Configure the Pylons environment 34 load_environment(global_conf, app_conf) 27 35 28 # Load our Pylons configuration defaults 29 config = load_environment(global_conf, app_conf) 30 config.init_app(global_conf, app_conf, package='microfacts') 31 32 # Load our default Pylons WSGI app and make g available 33 app = pylons.wsgiapp.PylonsApp(config, helpers=microfacts.lib.helpers, 34 g=app_globals.Globals) 35 g = app.globals 36 app = ConfigMiddleware(app, {'app_conf':app_conf, 37 'global_conf':global_conf}) 38 39 # YOUR MIDDLEWARE 40 # Put your own middleware here, so that any problems are caught by the error 41 # handling middleware underneath 42 43 # If errror handling and exception catching will be handled by middleware 44 # for multiple apps, you will want to set full_stack = False in your config 45 # file so that it can catch the problems. 36 # The Pylons WSGI app 37 app = PylonsApp() 38 39 # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares) 40 46 41 if asbool(full_stack): 47 # Change HTTPExceptions to HTTP responses 48 app = httpexceptions.make_middleware(app, global_conf) 49 50 # Error Handling 51 app = ErrorHandler(app, global_conf, error_template=error_template, **config.errorware) 52 53 # Display error documents for 401, 403, 404 status codes (if debug is disabled also 54 # intercepts 500) 42 # Handle Python exceptions 43 app = ErrorHandler(app, global_conf, error_template=error_template, 44 **config['pylons.errorware']) 45 46 # Display error documents for 401, 403, 404 status codes (and 47 # 500 when debug is disabled) 55 48 app = ErrorDocuments(app, global_conf, mapper=error_mapper, **app_conf) 56 49 57 50 # Establish the Registry for this application 58 51 app = RegistryManager(app) 59 60 static_app = StaticURLParser(config.paths['static_files'])52 53 # Static files 61 54 javascripts_app = StaticJavascripts() 55 static_app = StaticURLParser(config['pylons.paths']['static_files']) 62 56 app = Cascade([static_app, javascripts_app, app]) 63 57 return app -
microfacts/config/routing.py
r0 r1 1 """Routes configuration 2 3 The more specific and detailed routes should be defined first so they 4 may take precedent over the more generic routes. For more information 5 refer to the routes manual at http://routes.groovie.org/docs/ 1 6 """ 2 Setup your Routes options here 3 """ 4 import os 7 from pylons import config 5 8 from routes import Mapper 6 9 7 def make_map(global_conf={}, app_conf={}): 8 root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 10 def make_map(): 11 """Create, configure and return the routes Mapper""" 12 map = Mapper(directory=config['pylons.paths']['controllers'], 13 always_scan=config['debug']) 9 14 10 map = Mapper(directory=os.path.join(root_path, 'controllers')) 11 12 # This route handles displaying the error page and graphics used in the 404/500 13 # error pages. It should likely stay at the top to ensure that the error page is 14 # displayed properly. 15 # The ErrorController route (handles 404/500 error pages); it should 16 # likely stay at the top, ensuring it can always be resolved 15 17 map.connect('error/:action/:id', controller='error') 16 17 # Define your routes. The more specific and detailed routes should be defined first, 18 # so they may take precedent over the more generic routes. For more information, refer 19 # to the routes manual @ http://routes.groovie.org/docs/ 18 19 # CUSTOM ROUTES HERE 20 20 21 map.connect(':controller/:action/:id') 21 22 map.connect('*url', controller='template', action='view') -
microfacts/controllers/error.py
r0 r1 1 1 import os.path 2 from paste import fileapp 3 from pylons.middleware import media_path, error_document_template 4 from pylons.util import get_prefix 2 3 import paste.fileapp 4 from pylons.middleware import error_document_template, media_path 5 5 6 from microfacts.lib.base import * 6 7 7 8 class ErrorController(BaseController): 8 """ 9 Class to generate error documents as and when they are required. This behaviour of this 10 class can be altered by changing the parameters to the ErrorDocuments middleware in 11 your config/middleware.py file. 9 """Generates error documents as and when they are required. 10 11 The ErrorDocuments middleware forwards to ErrorController when error 12 related status codes are returned from the application. 13 14 This behaviour can be altered by changing the parameters to the 15 ErrorDocuments middleware in your config/middleware.py file. 12 16 """ 13 17 14 18 def document(self): 15 """ 16 Change this method to change how error documents are displayed 17 """ 18 page = error_document_template % { 19 'prefix': get_prefix(request.environ), 20 'code': request.params.get('code', ''), 21 'message': request.params.get('message', ''), 22 } 23 return Response(page) 19 """Render the error document""" 20 page = error_document_template % \ 21 dict(prefix=request.environ.get('SCRIPT_NAME', ''), 22 code=request.params.get('code', ''), 23 message=request.params.get('message', '')) 24 return page 24 25 25 26 def img(self, id): 27 """Serve Pylons' stock images""" 26 28 return self._serve_file(os.path.join(media_path, 'img', id)) 27 29 28 30 def style(self, id): 31 """Serve Pylons' stock stylesheets""" 29 32 return self._serve_file(os.path.join(media_path, 'style', id)) 30 33 31 34 def _serve_file(self, path): 32 fapp = fileapp.FileApp(path) 35 """Call Paste's FileApp (a WSGI application) to serve the file 36 at the specified path 37 """ 38 fapp = paste.fileapp.FileApp(path) 33 39 return fapp(request.environ, self.start_response) -
microfacts/controllers/template.py
r0 r1 2 2 3 3 class TemplateController(BaseController): 4 4 5 def view(self, url): 5 """ 6 This is the last place which is tried during a request to try to find a7 file to serve. It could be used for example to display a template::8 6 """By default, the final controller tried to fulfill the request 7 when no other routes match. It may be used to display a template 8 when all else fails, e.g.:: 9 9 10 def view(self, url): 10 return render_response(url) 11 12 Or, if you're using Myghty and would like to catch the component not 13 found error which will occur when the template doesn't exist; you 14 can use the following version which will provide a 404 if the template 15 doesn't exist:: 16 17 import myghty.exception 18 11 return render('/%s' % url) 12 13 Or if you're using Mako and want to explicitly send a 404 (Not 14 Found) response code when the requested template doesn't exist:: 15 16 import mako.exceptions 17 19 18 def view(self, url): 20 19 try: 21 return render _response('/'+url)22 except m yghty.exception.ComponentNotFound:23 return Response(code=404)24 25 The default is just to abort the request with a 404 File not found26 status message.20 return render('/%s' % url) 21 except mako.exceptions.TopLevelLookupException: 22 abort(404) 23 24 By default this controller aborts the request with a 404 (Not 25 Found) 27 26 """ 28 27 abort(404) -
microfacts/lib/app_globals.py
r0 r1 1 """The application's Globals object""" 2 from pylons import config 3 1 4 class Globals(object): 5 """Globals acts as a container for objects available throughout the 6 life of the application 7 """ 2 8 3 def __init__(self, global_conf, app_conf, **extra): 4 """ 5 Globals acts as a container for objects available throughout 6 the life of the application. 7 8 One instance of Globals is created by Pylons during 9 application initialization and is available during requests 10 via the 'g' variable. 11 12 ``global_conf`` 13 The same variable used throughout ``config/middleware.py`` 14 namely, the variables from the ``[DEFAULT]`` section of the 15 configuration file. 16 17 ``app_conf`` 18 The same ``kw`` dictionary used throughout 19 ``config/middleware.py`` namely, the variables from the 20 section in the config file for your application. 21 22 ``extra`` 23 The configuration returned from ``load_config`` in 24 ``config/middleware.py`` which may be of use in the setup of 25 your global variables. 26 27 """ 28 import microfacts.models as model 29 model.connect() 30 31 def __del__(self): 32 """ 33 Put any cleanup code to be run when the application finally exits 34 here. 9 def __init__(self): 10 """One instance of Globals is created during application 11 initialization and is available during requests via the 'g' 12 variable 35 13 """ 36 14 pass -
microfacts/lib/base.py
r0 r1 1 from pylons import Response, c, g, cache, request, session 1 """The base Controller API 2 3 Provides the BaseController class for subclassing, and other objects 4 utilized by Controllers. 5 """ 6 from pylons import c, cache, config, g, request, response, session 2 7 from pylons.controllers import WSGIController 8 from pylons.controllers.util import abort, etag_cache, redirect_to 3 9 from pylons.decorators import jsonify, validate 4 from pylons.templating import render, render_response 5 from pylons.helpers import abort, redirect_to, etag_cache 6 from pylons.i18n import N_, _, ungettext 7 import microfacts.models as model 10 from pylons.i18n import _, ungettext, N_ 11 from pylons.templating import render 12 8 13 import microfacts.lib.helpers as h 14 import microfacts.model as model 9 15 10 16 class BaseController(WSGIController): 17 11 18 def __call__(self, environ, start_response): 12 # Refresh database session 13 model.resync() 14 # Insert any code to be run per request here. The Routes match 15 # is under environ['pylons.routes_dict'] should you want to check 16 # the action or route vars here 19 """Invoke the Controller""" 20 # WSGIController.__call__ dispatches to the Controller method 21 # the request is routed to. This routing information is 22 # available in environ['pylons.routes_dict'] 17 23 return WSGIController.__call__(self, environ, start_response) 18 24 -
microfacts/lib/helpers.py
r0 r1 1 """ 2 Helper functions 1 """Helper functions 3 2 4 All names available in this module will be available under the Pylons h object. 3 Consists of functions to typically be used within templates, but also 4 available to Controllers. This module is available to both as 'h'. 5 5 """ 6 6 from webhelpers import * 7 from pylons.helpers import log8 from pylons.i18n import get_lang, set_lang -
microfacts/public/index.html
r0 r1 30 30 <h2>Weren't expecting to see this page?</h2> 31 31 32 <p>The microfacts/public/ directory is searched for static files 33 <i>before</i> your controllers are run. Remove this file (microfacts/public/index.html) and edit 34 the routes in <tt>microfacts/config/routing.py</tt> like so: 32 <p>The <tt>microfacts/public/</tt> directory is searched for static files 33 <i>before</i> your controllers are run. Remove this file (<tt>microfacts/public/index.html</tt>) 34 and edit the routes in <tt>microfacts/config/routing.py</tt> to point the 35 <a href="/">root path</a> to a 'hello' controller we'll create below: 35 36 <pre> map.connect('', controller='hello', action='index')</pre> 36 37 </p> 37 38 38 39 <h2>Getting Started</h2> 39 <p>You're now ready to start creating your own web application. Here's what a basic controller looks40 like to print out 'Hello World' and respond to http://127.0.0.1:5000/hello: 40 <p>You're now ready to start creating your own web application. To create a 'hello' controller, 41 run the following command in your project's root directory: 41 42 <pre> 42 # microfacts/controllers/hello.py 43 # Note that the line above is the file you should create and put the following into... 43 microfacts$ paster controller hello 44 </pre> 45 46 This generates the following the following code in <tt>microfacts/controllers/hello.py</tt>: 47 <pre> 48 import logging 44 49 45 50 from microfacts.lib.base import * 46 51 52 log = logging.getLogger(__name__) 53 47 54 class HelloController(BaseController): 55 48 56 def index(self): 49 return Response('Hello World') 50 57 # Return a rendered template 58 # return render('/some/template.mako) 59 # or, Return a response 60 return 'Hello World' 51 61 </pre> 62 </p> 63 <p>This controller simply prints out 'Hello World' to the browser. Pylons' default routes 64 automatically set up this controller to respond at the <a href="/hello">/hello</a> URL. 65 With the additional route described above, this controller will also respond at the 66 <a href="/">root path</a>. 52 67 </p> 53 68 54 69 <h3>Using a template</h3> 55 <p>If you want to call a template and do something a little more complex, here's an example printing out some 56 request information from a Myghty template. 70 <p>To call a template and do something a little more complex, this following example 71 shows how to print out some request information from a 72 <a href="http://www.makotemplates.org">Mako</a> template. 73 </p> 74 <p>Create a <tt>serverinfo.mako</tt> file in your project's <tt>microfacts/templates/</tt> 75 directory with the following contents: 76 </p> 57 77 <pre> 58 # microfacts/templates/serverinfo.myt 78 <h2> 79 Server info for ${request.host} 80 </h2> 59 81 60 <p>Hi, here's the server environment: <br /> 61 <% str(request.environ) %></p> 82 <p> 83 The URL you called: ${h.url_for()} 84 </p> 62 85 63 <p >64 here's the URL you called: <% h.url_for() %> 65 </p >86 <p> 87 The name you set: ${c.name} 88 </p> 66 89 67 <p> 68 and here's the name you set: <% c.name %> 69 </p> 70 90 <p>The WSGI environ:<br /> 91 <pre>${c.pretty_environ}</pre> 92 </p> 71 93 </pre> 72 94 73 Then add th is to your hellocontroller class:95 Then add the following to your 'hello' controller class: 74 96 <pre> 75 97 def serverinfo(self): 98 import cgi 99 import pprint 100 c.pretty_environ = cgi.escape(pprint.pformat(request.environ)) 76 101 c.name = 'The Black Knight' 77 return render _response('/serverinfo.myt')102 return render('/serverinfo.mako') 78 103 </pre> 79 104 80 You can now view the page at: <tt> http://127.0.0.1:5000/hello/serverinfo</tt>105 You can now view the page at: <tt><a href="/hello/serverinfo">/hello/serverinfo</a></tt> 81 106 </p> 82 107 </body> -
microfacts/tests/__init__.py
r0 r1 1 """Pylons application test package 2 3 When the test runner finds and executes tests within this directory, 4 this file will be loaded to setup the test environment. 5 6 It registers the root directory of the project in sys.path and 7 pkg_resources, in case the project hasn't been installed with 8 setuptools. It also initializes the application via websetup (paster 9 setup-app) with the project's test.ini configuration file. 10 """ 1 11 import os 2 12 import sys 3 13 from unittest import TestCase 14 15 import pkg_resources 16 import paste.fixture 17 import paste.script.appinstall 18 from paste.deploy import loadapp 19 from routes import url_for 20 21 __all__ = ['url_for', 'TestController'] 4 22 5 23 here_dir = os.path.dirname(os.path.abspath(__file__)) … … 7 25 8 26 sys.path.insert(0, conf_dir) 9 10 import pkg_resources11 12 27 pkg_resources.working_set.add_entry(conf_dir) 13 14 28 pkg_resources.require('Paste') 15 29 pkg_resources.require('PasteScript') 16 17 from paste.deploy import loadapp18 import paste.fixture19 import paste.script.appinstall20 21 from microfacts.config.routing import *22 from routes import request_config, url_for23 30 24 31 test_file = os.path.join(conf_dir, 'test.ini') … … 26 33 cmd.run([test_file]) 27 34 28 wsgiapp = loadapp('config:test.ini', relative_to=conf_dir) 29 from microfacts import models as model 30 model.connect() 35 class TestController(TestCase): 31 36 32 class TestModel(TestCase): 33 def setUp(self): 34 model.resync() 35 model.metadata.create_all() 36 def tearDown(self): 37 model.metadata.drop_all() 38 39 class TestController(TestModel): 40 def __init__(self, *args): 37 def __init__(self, *args, **kwargs): 38 wsgiapp = loadapp('config:test.ini', relative_to=conf_dir) 41 39 self.app = paste.fixture.TestApp(wsgiapp) 42 TestModel.__init__(self, *args) 43 44 __all__ = ['url_for', 'TestController', 'TestModel', 'model'] 40 TestCase.__init__(self, *args, **kwargs) -
microfacts/websetup.py
r0 r1 1 from paste.deploy import loadapp 1 """Setup the microfacts application""" 2 import logging 3 4 from paste.deploy import appconfig 5 from pylons import config 6 7 from microfacts.config.environment import load_environment 8 9 log = logging.getLogger(__name__) 2 10 3 11 def setup_config(command, filename, section, vars): 4 """ 5 Place any commands to setup sandbox here. 6 """ 7 app = loadapp('config:' + filename) 8 from microfacts import models as model 9 model.connect() 12 """Place any commands to setup microfacts here""" 13 conf = appconfig('config:' + filename) 14 load_environment(conf.global_conf, conf.local_conf) -
setup.py
r0 r1 1 from setuptools import setup, find_packages 1 try: 2 from setuptools import setup, find_packages 3 except ImportError: 4 from ez_setup import use_setuptools 5 use_setuptools() 6 from setuptools import setup, find_packages 2 7 3 8 setup( 4 9 name='microfacts', 5 version="", 6 #description="", 7 #author="", 8 #author_email="", 9 #url="", 10 install_requires=["Pylons>=0.9.4"], 11 packages=find_packages(), 10 version='0.1', 11 license='MIT', 12 description=\ 13 "A web application for threading together 'factlets' into narratives organized by theme, time and space.", 14 author='Open Knowledge Foundation', 15 author_email='info@okfn.org', 16 url='http://www.okfn.org/microfacts/', 17 install_requires=["Pylons>=0.9.6.1"], 18 packages=find_packages(exclude=['ez_setup']), 12 19 include_package_data=True, 13 test_suite ='nose.collector',20 test_suite='nose.collector', 14 21 package_data={'microfacts': ['i18n/*/LC_MESSAGES/*.mo']}, 22 #message_extractors = {'microfacts': [ 23 # ('**.py', 'python', None), 24 # ('public/**', 'ignore', None)]}, 15 25 entry_points=""" 16 26 [paste.app_factory] 17 main=microfacts:make_app 27 main = microfacts.config.middleware:make_app 28 18 29 [paste.app_install] 19 main =paste.script.appinstall:Installer30 main = pylons.util:PylonsInstaller 20 31 """, 21 32 ) -
test.ini
r0 r1 6 6 [DEFAULT] 7 7 debug = true 8 email_to = you@yourdomain.com 8 # Uncomment and replace with the address which should receive any error reports 9 #email_to = you@yourdomain.com 9 10 smtp_server = localhost 10 11 error_email_from = paste@localhost … … 19 20 20 21 # Add additional test specific configuration options as necessary. 21 22 sqlalchemy.dburi = sqlite:///:memory:
