def render(self, context):
        result = '<div class="pagination pagination-centered">\
                    <ul>'

        start = int(self.start.resolve(context))
        total = int(self.total.resolve(context))
        page = (start/settings.PAGE_SIZE) + 1
        onclick = """onclick="replaceContents('<img class=&quot;loader&quot; src=&quot;""" + settings.STATIC_URL + """img/ajax-loader.gif&quot;>');Dajaxice.Brownian.view.getData(replaceContents, {'type': '%s', 'query': '%s', 'indices': '%s', """ % (self.openTab.resolve(context), self.query.resolve(context), self.indices.resolve(context)) + """'sort': {&quot;%s&quot;: {&quot;order&quot;: &quot;%s&quot;}}, """ % (self.sortField.resolve(context), self.sortOrder.resolve(context)) + """'start': '%s'});" """
        if page == 1 and total > settings.PAGE_SIZE:
            result += '<li class="disabled"><a href="#">&laquo;</a></li>'
            result += '<li class="disabled"><a href="#">&lsaquo;</a></li>'
        elif total > settings.PAGE_SIZE:
            result += '<li><a href="#"' + onclick % 0 + '>&laquo;</a></li>'
            result += '<li><a href="#"' + onclick % (settings.PAGE_SIZE*(page-2)) + '>&lsaquo;</a></li>'
            result += '<li><a href="#"' + onclick % (settings.PAGE_SIZE*(2-page)) + '>' + str(page - 1) + '</a></li>'

        if total > settings.PAGE_SIZE:
            result += '<li class="active"><a href="#">' + str(page) + '</a></li>'

        if (start + settings.PAGE_SIZE) < total:
            result += '<li><a href="#"' + onclick % (settings.PAGE_SIZE*page) + '>' + str(page + 1) + '</a></li>'
            if (start + 2*settings.PAGE_SIZE) < total:
                result += '<li><a href="#"' + onclick % (settings.PAGE_SIZE*(page+1)) + '>' + str(page + 2) + '</a></li>'
                if (start + 3*settings.PAGE_SIZE) < total:
                        result += '<li><a href="#"' + onclick % (settings.PAGE_SIZE*(page+2)) + '>' + str(page + 3) + '</a></li>'

        if (start + settings.PAGE_SIZE) < total:
            result += '<li><a href="#"' + onclick % (settings.PAGE_SIZE*page) + '>&rsaquo;</a></li>'

        result += '</ul>\
                  </div>'

        return result
dataset/ETHPy150Open grigorescu/Brownian/Brownian/view/templatetags/es_extras.py/Paginate.render/swapped operands of `-`