使用 sqlalchemy-datatables 呈现 table

2014-01-27 17:44:00 +08:00
 yoyicue
其实我们很多后台需求都是 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
7286 次点击
所在节点    SQLAlchemy
5 条回复
tanywei
2014-05-27 10:01:48 +08:00
代码呢?
yoyicue
2014-05-28 08:02:05 +08:00
@tanywei 我才发觉粘贴错了, 在这里:
https://github.com/yoyicue/sqlalchemy-datatables
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
2014-05-28 11:19:35 +08:00
@clino 我没改写 test-project
clino
2014-05-28 12:48:50 +08:00
看不到例子,不知道呈现 table 是什么意思?数据库的表结构和关系吗?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/98508

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX