小编ion*_*ian的帖子

数据表ajax.reload()不起作用

我花了太多时间,无法理解为什么数据表无法刷新我的表,我已经对这个数据表感到疯狂

我的代码在下面,我花了数周的时间但无法正常工作,我使用了ajax.reload

DataTablesDraw = (selector, order, pages, file, sort, column, template, data_set) ->
$(selector).DataTable
  'pageLength': pages
  'ordering': sort
  'destroy' : true,
  'paging': true
  'responsive': true
  'searching': false
  'info': false
  'lengthChange': true
  'autoWidth': false
  'select': true
  'dom': 'Bfrtip',

  'buttons': [
          {
            'extend': 'excelHtml5',
            'title': file + new Date()
          },
          'copyHtml5'
      ],
  'order': [ [ column, 'desc' ] ],
  'language': {
        buttons: {
            copyTitle: i18n[lang]['id[9]'],
            copySuccess: {
                _: i18n[lang]['id[10]'] + ' %d ' + i18n[lang]['id[11]'],
                1: i18n[lang]['id[12]']
            }
        }
    }
  'ajax': '/settings/ranges/ranges.txt', …
Run Code Online (Sandbox Code Playgroud)

javascript ajax jquery datatables

3
推荐指数
2
解决办法
1万
查看次数

RecursionError:获取对象的str时超出了最大递归深度

在这里看到这么多关于这个问题的例子,但是不能理清我的例子.

任何sugegstion将是欣赏,已经有他的recursiona dd无法修复它的headdake.

tree = {}

def populate_node(account):
    node = '%(LOGIN)s,%(server_id)s' % account
    tree[node]['login'] = account['LOGIN']
    tree[node]['email'] = account['EMAIL'].lower()
    tree[node]['server_id'] = account['server_id']

for account in accounts:
    node = '%(LOGIN)s,%(server_id)s' % account
    parent = None
    if account['AGENT_ACCOUNT']:
        parent = '%(AGENT_ACCOUNT)s,%(server_id)s' % account
    if node not in tree:
        tree[node] = {}
    populate_node(account)
    if parent:
        tree[node]['parent'] = parent
        if parent not in tree:
            tree[parent] = {
                'login': parent,
                'server_id': account['server_id'],
                'children': [node],
            }
        else:
            if 'children' not in tree[parent]:
                tree[parent]['children'] = [node]
            else: …
Run Code Online (Sandbox Code Playgroud)

python recursion python-3.5

1
推荐指数
1
解决办法
3167
查看次数

标签 统计

ajax ×1

datatables ×1

javascript ×1

jquery ×1

python ×1

python-3.5 ×1

recursion ×1