Changeset - fdcef6ea3b55
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 15 years ago 2010-05-26 00:05:30
marcin@python-works.com
Added readme, and changed version display
2 files changed with 19 insertions and 20 deletions:
0 comments (0 inline, 0 general)
README.txt
Show inline comments
 
This file is for you to describe the pylons_app application. Typically
 
you would include information such as the information below:
 

	
 
Installation and Setup
 
======================
 

	
 
Install ``pylons_app`` using easy_install::
 

	
 
    easy_install pylons_app
 
Pylons based replacement for hgwebdir. Fully customizable, 
 
with authentication, permissions. Based on vcs library.
 
- has it's own middleware to handle mercurial protocol request each request can
 
  be logged and authenticated +threaded performance unlikely to hgweb
 
- mako templates let's you cusmotize look and feel of appplication.
 
- diffs annotations and source code all colored by pygments.
 
- admin interface for performing user/permission managments as well as repository
 
  managment
 
- added cache with invalidation on push/repo managment for high performance and
 
  always upto date data.
 
- rss /atom feed customizable
 
- future support for git
 
- based on pylons 1.0 / sqlalchemy 0.6
 

	
 
Make a config file as follows::
 

	
 
    paster make-config pylons_app config.ini
 

	
 
Tweak the config file as appropriate and then setup the application::
 

	
 
    paster setup-app config.ini
 

	
 
Then you are ready to go.
 
===
 
This software is still in beta mode. I don't guarantee that it'll work.
 
I started this project since i was tired of sad looks, and zero controll over
 
our company regular hgwebdir.
pylons_app/lib/base.py
Show inline comments
 
@@ -7,26 +7,26 @@ from pylons import config, tmpl_context 
 
from pylons.controllers import WSGIController
 
from pylons.templating import render_mako as render
 
from pylons_app.lib.auth import LoginRequired, AuthUser
 
from pylons_app.lib.utils import get_repo_slug
 
from pylons_app.model import meta
 
from pylons_app.model.hg_model import HgModel
 
from pylons_app import get_version
 
from pylons_app import __version__
 

	
 
@cache_region('long_term', 'cached_repo_list')
 
def _get_repos_cached():
 
    return [rep for rep in HgModel().get_repos()]
 

	
 
@cache_region('long_term', 'full_changelog')
 
def _full_changelog_cached(repo_name):
 
    return list(reversed(list(HgModel().get_repo(repo_name))))  
 

	
 
class BaseController(WSGIController):
 
    
 
    def __before__(self):
 
        c.hg_app_version = get_version()
 
        c.hg_app_version = __version__
 
        c.repos_prefix = config['hg_app_name']
 
        c.repo_name = get_repo_slug(request)
 
        c.hg_app_user = session.get('hg_app_user', AuthUser())
 
        c.cached_repo_list = _get_repos_cached()
 
        self.sa = meta.Session
 
    
0 comments (0 inline, 0 general)