Mercurial > kallithea
diff rhodecode/model/db.py @ 1343:a04fe5986109 beta
#47 implemented basic gui for browsing repo groups
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 23 May 2011 00:00:03 +0200 |
parents | 89ff3e30470f |
children | 3bce31f026b8 |
line wrap: on
line diff
--- a/rhodecode/model/db.py Sun May 22 21:09:02 2011 +0200 +++ b/rhodecode/model/db.py Mon May 23 00:00:03 2011 +0200 @@ -297,10 +297,12 @@ class Group(Base): __tablename__ = 'groups' __table_args__ = (UniqueConstraint('group_name'), {'useexisting':True},) + __mapper_args__ = {'order_by':'group_name'} group_id = Column("group_id", Integer(), nullable=False, unique=True, default=None, primary_key=True) group_name = Column("group_name", String(length=255, convert_unicode=False, assert_unicode=None), nullable=False, unique=True, default=None) group_parent_id = Column("group_parent_id", Integer(), ForeignKey('groups.group_id'), nullable=True, unique=None, default=None) + group_description = Column("group_description", String(length=10000, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) parent_group = relationship('Group', remote_side=group_id) @@ -336,7 +338,7 @@ @property def repositories(self): - return Session.query(Repository).filter(Repository.group == self).all() + return Session.query(Repository).filter(Repository.group == self) class Permission(Base): __tablename__ = 'permissions'