Show More
@@ -10,7 +10,7 b' class User(Base):' | |||||
10 | username = Column("username", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) |
|
10 | username = Column("username", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) | |
11 | password = Column("password", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) |
|
11 | password = Column("password", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) | |
12 | active = Column("active", BOOLEAN(), nullable=True, unique=None, default=None) |
|
12 | active = Column("active", BOOLEAN(), nullable=True, unique=None, default=None) | |
13 |
admin = Column("admin", BOOLEAN(), nullable=True, unique=None, default= |
|
13 | admin = Column("admin", BOOLEAN(), nullable=True, unique=None, default=False) | |
14 | name = Column("name", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) |
|
14 | name = Column("name", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) | |
15 | lastname = Column("lastname", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) |
|
15 | lastname = Column("lastname", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) | |
16 | email = Column("email", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) |
|
16 | email = Column("email", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) |
@@ -2,6 +2,7 b'' | |||||
2 | # encoding: utf-8 |
|
2 | # encoding: utf-8 | |
3 | # Model for hg app |
|
3 | # Model for hg app | |
4 | # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> |
|
4 | # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> | |
|
5 | from sqlalchemy.orm import joinedload | |||
5 |
|
6 | |||
6 | # This program is free software; you can redistribute it and/or |
|
7 | # This program is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU General Public License |
|
8 | # modify it under the terms of the GNU General Public License | |
@@ -116,6 +117,7 b' class HgModel(object):' | |||||
116 | repos_list[name].name = name |
|
117 | repos_list[name].name = name | |
117 | dbrepo = sa.query(Repository).get(name) |
|
118 | dbrepo = sa.query(Repository).get(name) | |
118 | if dbrepo: |
|
119 | if dbrepo: | |
|
120 | repos_list[name].dbrepo = dbrepo | |||
119 | repos_list[name].description = dbrepo.description |
|
121 | repos_list[name].description = dbrepo.description | |
120 | repos_list[name].contact = dbrepo.user.full_contact |
|
122 | repos_list[name].contact = dbrepo.user.full_contact | |
121 | except OSError: |
|
123 | except OSError: | |
@@ -149,7 +151,7 b' class HgModel(object):' | |||||
149 | tmp_d['contact_sort'] = tmp_d['contact'] |
|
151 | tmp_d['contact_sort'] = tmp_d['contact'] | |
150 | tmp_d['repo_archives'] = list(repo._get_archives()) |
|
152 | tmp_d['repo_archives'] = list(repo._get_archives()) | |
151 | tmp_d['last_msg'] = tip.message |
|
153 | tmp_d['last_msg'] = tip.message | |
152 |
|
154 | tmp_d['repo'] = repo | ||
153 | yield tmp_d |
|
155 | yield tmp_d | |
154 |
|
156 | |||
155 | def get_repo(self, repo_name): |
|
157 | def get_repo(self, repo_name): |
General Comments 0
You need to be logged in to leave comments.
Login now