##// END OF EJS Templates
cleanup: few fixes
super-admin -
r5116:cc48fcd2 default
parent child Browse files
Show More
@@ -994,7 +994,7 b' class Page(CustomPager):'
994 994 def __init__(self, collection, page=1, items_per_page=20, item_count=None,
995 995 url_maker=None, **kwargs):
996 996 """
997 Special type of pager. We intercept collection to wrap it in our custom
997 Special type of pager. We intercept a collection to wrap it in our custom
998 998 logic instead of using wrapper_class
999 999 """
1000 1000
@@ -1011,14 +1011,20 b' class SqlPage(CustomPager):'
1011 1011 def __init__(self, collection, page=1, items_per_page=20, item_count=None,
1012 1012 url_maker=None, **kwargs):
1013 1013 """
1014 Special type of pager. We intercept collection to wrap it in our custom
1014 Special type of pager. We intercept a collection to wrap it in our custom
1015 1015 logic instead of using wrapper_class
1016 1016 """
1017 1017 collection = SqlalchemyOrmWrapper(self, collection)
1018 1018
1019 super(SqlPage, self).__init__(collection=collection, page=page,
1020 items_per_page=items_per_page, item_count=item_count,
1021 wrapper_class=None, url_maker=url_maker, **kwargs)
1019 super().__init__(
1020 collection=collection,
1021 page=page,
1022 items_per_page=items_per_page,
1023 item_count=item_count,
1024 wrapper_class=None,
1025 url_maker=url_maker,
1026 **kwargs
1027 )
1022 1028
1023 1029
1024 1030 class RepoCommitsWrapper(object):
@@ -192,6 +192,7 b' class NotificationModel(BaseModel):'
192 192 elif filter_:
193 193 q = q.filter(Notification.type_.in_(filter_))
194 194
195 q = q.order_by(Notification.created_on.desc())
195 196 return q
196 197
197 198 def mark_read(self, user, notification):
@@ -54,7 +54,7 b" GIT_REPO_WITH_GROUP = f'{REPO_GROUP}/{GI"
54 54 log = logging.getLogger(__name__)
55 55
56 56 # Docker image running httpbin...
57 HTTPBIN_DOMAIN = 'http://httpbin'
57 HTTPBIN_DOMAIN = 'http://httpbin:9090'
58 58 HTTPBIN_POST = HTTPBIN_DOMAIN + '/post'
59 59
60 60
General Comments 0
You need to be logged in to leave comments. Login now