V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yoyicue
V2EX  ›  SQLAlchemy

使用 sqlalchemy-datatables 呈现 table

  •  
  •   yoyicue · 2014-01-27 17:44:00 +08:00 · 7235 次点击
    这是一个创建于 3713 天前的主题,其中的信息可能已经有所发展或是发生改变。
    其实我们很多后台需求都是 table.
    而 DataTables 是好多年来呈现 table 不多的选择之一
    能解决大部分对于 table 的需求.

    但是 API 有些繁琐, 这次恰好看到了有 Python 相关的封装, 推荐给大家

    Pyramid 框架
    https://github.com/Pegase745/sqlalchemy-datatables

    稍微改了下, 做成了 Flask 框架的:
    https://github.com/Pegase745/sqlalchemy-datatables

    Django 的选择貌似多了些:
    https://github.com/noirbizarre/django-eztables
    https://github.com/pivotal-energy-solutions/django-datatable-view
    https://bitbucket.org/pigletto/django-datatables-view
    第 1 条附言  ·  2014-05-28 08:01:31 +08:00
    发觉粘贴的修改地址写错了, 应该是:
    https://github.com/yoyicue/sqlalchemy-datatables
    5 条回复    2014-05-28 12:48:50 +08:00
    tanywei
        1
    tanywei  
       2014-05-27 10:01:48 +08:00
    代码呢?
    yoyicue
        2
    yoyicue  
    OP
       2014-05-28 08:02:05 +08:00
    @tanywei 我才发觉粘贴错了, 在这里:
    https://github.com/yoyicue/sqlalchemy-datatables
    clino
        3
    clino  
       2014-05-28 11:04:34 +08:00
    按文档里的:"Testing the Pyramid based ''test-project''"
    部分操作以后在 http://localhost:6543 结果有错:
    ValueError
    ValueError: No such renderer factory .pt
    Traceback (most recent call last)
    yoyicue
        4
    yoyicue  
    OP
       2014-05-28 11:19:35 +08:00
    @clino 我没改写 test-project
    clino
        5
    clino  
       2014-05-28 12:48:50 +08:00
    看不到例子,不知道呈现 table 是什么意思?数据库的表结构和关系吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3238 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:05 · PVG 20:05 · LAX 05:05 · JFK 08:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.