Changeset - e47d1db5ef20
[Not reviewed]
default
0 4 0
Marcin Kuzminski - 16 years ago 2010-04-18 20:06:35
marcin@python-blog.com
Added few options to configs,
Changed error middleware. TO basic pylons behavior
4 files changed with 22 insertions and 8 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -19,7 +19,15 @@ debug = true
 
#error_message = 'mercurial crash !'
 

	
 
[server:main]
 
##nr of threads to spawn
 
threadpool_workers = 5
 

	
 
##max request before
 
threadpool_max_requests = 2
 

	
 
##option to use threads of process
 
use_threadpool = true
 

	
 
use = egg:Paste#http
 
host = 127.0.0.1
 
port = 5000
production.ini
Show inline comments
 
@@ -19,7 +19,15 @@ debug = true
 
#error_message = 'mercurial crash !'
 

	
 
[server:main]
 
threadpool_workers = 10
 
##nr of threads to spawn
 
threadpool_workers = 5
 

	
 
##max request before
 
threadpool_max_requests = 2
 

	
 
##option to use threads of process
 
use_threadpool = true
 

	
 
use = egg:Paste#http
 
host = 127.0.0.1
 
port = 8001
pylons_app/config/middleware.py
Show inline comments
 
@@ -51,10 +51,9 @@ def make_app(global_conf, full_stack=Tru
 
        # Display error documents for 401, 403, 404 status codes (and
 
        # 500 when debug is disabled)
 
        if asbool(config['debug']):
 
            #don't handle 404, since mercurial does it for us.
 
            app = StatusCodeRedirect(app, [400, 401, 403])
 
            app = StatusCodeRedirect(app)
 
        else:
 
            app = StatusCodeRedirect(app, [400, 401, 403, 500])
 
            app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
 
    
 
    # Establish the Registry for this application
 
    app = RegistryManager(app)
pylons_app/controllers/shortlog.py
Show inline comments
 
@@ -7,6 +7,7 @@ from pylons_app.lib.base import BaseCont
 
from pylons_app.lib.utils import get_repo_slug
 
from pylons_app.model.hg_model import HgModel
 
from webhelpers.paginate import Page
 

	
 
log = logging.getLogger(__name__)
 

	
 
class ShortlogController(BaseController):
 
@@ -24,12 +25,10 @@ class ShortlogController(BaseController)
 
        cnt = repo.revisions[-1]
 
        gen = repo.get_changesets(None)
 
        repo_changesets = list(gen)
 
        repo_changesets2 = list(gen)
 
        repo_changesets3 = list(gen)
 
        repo_changesets4 = list(gen)
 
         
 
        c.repo_changesets = Page(repo_changesets, page=p, item_count=cnt, items_per_page=lim)
 
        c.shortlog_data = render('shortlog_data.html')
 
        if request.params.get('partial'):
 
            return c.shortlog_data
 
        return render('/shortlog.html')
 
        r = render('/shortlog.html')
 
        return r
0 comments (0 inline, 0 general)