halicea web框架(halweb)是一个新兴的mvcweb框架,用于真正容易理解和快速的开发。
HalWeb的Python项目详细描述
注
这是halweb的初始版本,将有与当前版本不兼容的更改。所以请耐心等待。
如果您急于尝试,则需要手动设置config.py中的appenginepath以进行halweb安装。
当然,您的系统上需要有appengine
安装
这三项工作中的任何一项:
shell>python setup.py install or shell>easy_install halweb or shell>python setup.py install`
一些示例
创建项目
open hal.py in your shell by typing hal:
cmd>halCreate a project:
shell>hal hal>project /home/myhome/MyProjects/TestProjectRun your project:
shell>cd /home/myhome/MyProjects/TestProject shell>python manage.py hal>runWoalla you have your project setup and running
在项目中创建模型、视图、控制器、窗体和处理程序
Open the manage.py console in you project and type:
hal>>mvcfh Galery.PhotoThe console will give you the opportunity to setup the model:
..............class Galery.Photo(db.Model): Property0>........Populate it like this:
..............class Galery.Photo(db.Model): Property0>........Name str required=True Property1>........Description txt Property2>........DateCreated date Property3>........Content blob Property4>........MimeType str Property5>........ Save Galery.Photo?(y/n) yWith this you have defined the Model, It’s controller, forms and also address binding which is added in the handlerMap.py file
You can also add different Models under the ‘Package’ Galery and use them in the code
Later you can
操纵你galery包
With
Exporting it to some directory:
hal>pack package Galery /some/destination/NameOfThePackageAlso unpack it from there to some other Hal project:
hal>unpack package Galery /from/the/package/directoryOr delete it if you were just playing:
hal>del package GaleryNote: Official Online Hal Packages Repository is comming soon
继续探索;)
我将在不久的将来投入更多,解释它的工作原理。:)