1 Star 0 Fork 0

DaimaXiaozi/android_external_clearsilver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
README.python 2.06 KB
一键复制 编辑 原始数据 按行查看 历史
************************************************************
*** Python Environment Information
* Python - we know it and love it
* Apache - the defacto standard
* PyApache/mod_python
Either one is fine, the goal is to load all Python code once, before
Apache forks. Then, for every web-request, Apache just makes a
function call into the Python environment which serves the page. This
is "really fast" as it gets rid of all of the parsing and loading of
Python. Various versions of PyApache and mod_python have gained and
lost and gained again the ability to do this well. We used a hacked
version of PyApache way back when, I think mod_python does this out of
the box today.
************************************************************
*** Python Tools
* CSPage.py
This is our "page rendering superclass". It's pretty simple and has
nice machinery for some of the stuff talked about on this list. For
example, it has nice debugging and redirect support, and it has a
mechanism for mapping form submit buttons to method names. Here is an
example of how the form stuff works:
<form action="foo.py">
<input type=submit name="Action.Foo" value="Do Foo!">
</form>
class MyPage(CSPage):
def setup(self):
# this runs before everything else
pass
def display(self):
# this is a regular non-submission render
pass
def Action_Foo(self):
# this is run automatically when the Foo submit button is clicked
pass
* odb.py
This is an object to relational database mapping tool. It makes
interacting with SQL databases really easy. It gives you a place to
put all your SQL code. It also could be changed to work with flat
files as well. We have some nice hooks to connect this to Clearsilver,
so rendering database data into webpages is really easy. Here is an
example:
rows = mydb.mytable.fetchAllRows() # fetch all rows
rows.hdfExport("CGI.tabledata",ncgi.hdf) # export them into the dataset
# it is also really easy to change rows:
row = mydb.mytable.fetchRow( ('user', 'jeske') )
row.email = 'jeske at chat.net'
row.save()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/daimaxiaozi/android_external_clearsilver.git
git@gitee.com:daimaxiaozi/android_external_clearsilver.git
daimaxiaozi
android_external_clearsilver
android_external_clearsilver
gb-release-7.2

搜索帮助