Show More
@@ -47,8 +47,8 b' hg_app_name = Python-works' | |||
|
47 | 47 | beaker.cache.data_dir=/tmp/cache/data |
|
48 | 48 | beaker.cache.lock_dir=/tmp/cache/lock |
|
49 | 49 | beaker.cache.regions=short_term,long_term |
|
50 |
beaker.cache.long_term.type= |
|
|
51 | beaker.cache.long_term.expire=3600 | |
|
50 | beaker.cache.long_term.type=memory | |
|
51 | beaker.cache.long_term.expire=36000 | |
|
52 | 52 | beaker.cache.short_term.type=memory |
|
53 | 53 | beaker.cache.short_term.expire=60 |
|
54 | 54 |
@@ -47,8 +47,8 b' hg_app_name = Python-works' | |||
|
47 | 47 | beaker.cache.data_dir=/tmp/cache/data |
|
48 | 48 | beaker.cache.lock_dir=/tmp/cache/lock |
|
49 | 49 | beaker.cache.regions=short_term,long_term |
|
50 |
beaker.cache.long_term.type= |
|
|
51 | beaker.cache.long_term.expire=3600 | |
|
50 | beaker.cache.long_term.type=memory | |
|
51 | beaker.cache.long_term.expire=36000 | |
|
52 | 52 | beaker.cache.short_term.type=memory |
|
53 | 53 | beaker.cache.short_term.expire=60 |
|
54 | 54 |
@@ -1,13 +1,9 b'' | |||
|
1 |
from pylons import tmpl_context as c, |
|
|
2 | url | |
|
3 | from pylons.controllers.util import abort, redirect | |
|
1 | from pylons import tmpl_context as c, request | |
|
4 | 2 | from pylons_app.lib.auth import LoginRequired |
|
5 | from pylons_app.lib.base import BaseController, render | |
|
6 | from pylons_app.lib.utils import get_repo_slug | |
|
3 | from pylons_app.lib.base import BaseController, render, _full_changelog_cached | |
|
7 | 4 | from pylons_app.model.hg_model import HgModel |
|
8 | 5 | import logging |
|
9 | 6 | |
|
10 | ||
|
11 | 7 | log = logging.getLogger(__name__) |
|
12 | 8 | |
|
13 | 9 | class SummaryController(BaseController): |
@@ -19,16 +15,14 b' class SummaryController(BaseController):' | |||
|
19 | 15 | def index(self): |
|
20 | 16 | hg_model = HgModel() |
|
21 | 17 | c.repo_info = hg_model.get_repo(c.repo_name) |
|
22 |
c.repo_changesets = c.repo_ |
|
|
18 | c.repo_changesets = _full_changelog_cached(c.repo_name)[:10] | |
|
23 | 19 | |
|
24 | 20 | e = request.environ |
|
25 | #BUG: protocol doesnt show https | |
|
26 | 21 | uri = u'%(protocol)s://%(user)s@%(host)s/%(repo_name)s' % { |
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 | } | |
|
22 | 'protocol': e.get('wsgi.url_scheme'), | |
|
23 | 'user':str(c.hg_app_user.username), | |
|
24 | 'host':e.get('HTTP_HOST'), | |
|
25 | 'repo_name':c.repo_name, } | |
|
32 | 26 | c.clone_repo_url = uri |
|
33 | 27 | c.repo_tags = c.repo_info.tags[:10] |
|
34 | 28 | c.repo_branches = c.repo_info.branches[:10] |
@@ -16,6 +16,9 b' class Users(Base):' | |||
|
16 | 16 | last_login = Column("last_login", DATETIME(timezone=False), nullable=True, unique=None, default=None) |
|
17 | 17 | |
|
18 | 18 | user_log = relation('UserLogs') |
|
19 | ||
|
20 | def __repr__(self): | |
|
21 | return "<User('%s:%s')>" % (self.user_id, self.username) | |
|
19 | 22 | |
|
20 | 23 | class UserLogs(Base): |
|
21 | 24 | __tablename__ = 'user_logs' |
@@ -34,3 +37,6 b' class Permissions(Base):' | |||
|
34 | 37 | __table_args__ = {'useexisting':True} |
|
35 | 38 | permission_id = Column("id", INTEGER(), nullable=False, unique=True, default=None, primary_key=1) |
|
36 | 39 | permission_name = Column("permission_name", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) |
|
40 | ||
|
41 | def __repr__(self): | |
|
42 | return "<Permission('%s:%s')>" % (self.permission_id, self.permission_name) |
General Comments 0
You need to be logged in to leave comments.
Login now