Mercurial > kallithea
comparison rhodecode/controllers/admin/settings.py @ 3389:1c4505e3be5b beta
show flags, and desc sort pull request based on created_date ref #765
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 20 Feb 2013 02:15:12 +0100 |
parents | 069884383cc7 |
children | 7854097b189c |
comparison
equal
deleted
inserted
replaced
3388:cb40b3f6428c | 3389:1c4505e3be5b |
---|---|
475 @NotAnonymous() | 475 @NotAnonymous() |
476 def my_account_my_pullrequests(self): | 476 def my_account_my_pullrequests(self): |
477 c.my_pull_requests = PullRequest.query()\ | 477 c.my_pull_requests = PullRequest.query()\ |
478 .filter(PullRequest.user_id == | 478 .filter(PullRequest.user_id == |
479 self.rhodecode_user.user_id)\ | 479 self.rhodecode_user.user_id)\ |
480 .order_by(PullRequest.created_on.desc())\ | |
480 .all() | 481 .all() |
481 c.participate_in_pull_requests = \ | 482 |
483 c.participate_in_pull_requests = sorted( | |
482 [x.pull_request for x in PullRequestReviewers.query()\ | 484 [x.pull_request for x in PullRequestReviewers.query()\ |
483 .filter(PullRequestReviewers.user_id == | 485 .filter(PullRequestReviewers.user_id == |
484 self.rhodecode_user.user_id)\ | 486 self.rhodecode_user.user_id)\ |
485 .all()] | 487 .all()], |
488 key=lambda o: o.created_on, reverse=True) | |
489 | |
486 return render('admin/users/user_edit_my_account_pullrequests.html') | 490 return render('admin/users/user_edit_my_account_pullrequests.html') |
487 | 491 |
488 @NotAnonymous() | 492 @NotAnonymous() |
489 def create_repository(self): | 493 def create_repository(self): |
490 """GET /_admin/create_repository: Form to create a new item""" | 494 """GET /_admin/create_repository: Form to create a new item""" |