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