我试图在金字塔Sprox建立最简单的可能的形式。与金字塔sprox你好世界
# model.py
class Allocation:
# some fields ...
class SproxForm(AddRecordForm):
__model__ = Allocation
sprox_form = SproxForm(DBSession)
# views.py
def sprox_form(request):
return {'f':sprox_form,'kw':{}}
<html>
<body>
<div tal:content="structure f(kw)"/>
</body>
</html>
,但它只是打印出{'kw': {}, 'f': }
的forms tutorial使用TurboGears2书面和我不能要翻译成金字塔,因为我是新来的金字塔。
所以有人可以告诉我我做错了什么,或者给我看一个使用金字塔的简短(但是完整)的例子吗?
解决了,但我仍然有一个相关的问题http://stackoverflow.com/questions/14425584/hello-world-of-sprox-with-pyramid-part-2 – pihentagy