OverviewDirectory StructureAdding a PageModifying a PageModifying Style
WebBot API Overview
This section of the WebBot site provides an overview of variuos features of the WebBot framework. However, to get more in depth usage guides you will want to look at the individual libraries WebBot uses to enable dynamic web page development.
Python Libraries used by WebBot
Tools and Applications used with WebBot
The WebBot Directory Structure Guide
WebBot strives to provide a directory structure that makes it easy and clear where changes are made. In case the layout itself was not self evident - below is a definition of every folder used by WebBot:
Adding a New WebBot Page
It will ask you for the python name of your new page (which will double as it's URL) and a general description of your page. Using this information it will create your new page accessible from [AppURL]/[PageName].
Modifying a WebBot Page
Each page in WebBot is placed in its own directory and has its definition split into a minimum of two files: The view file(Template.wui) and control file (Servlet.py).
''' The Home Page for your App'''importloggingaslogfromWebBotimportPage,PageControlsfromWebElementsimportUITemplateclassHome(Page):classContentControl(PageControls.TemplateControl):template=UITemplate.fromFile("Pages/Home/Template.wui")definitUI(self,ui,request):''' The initial setup of the interface (such as dynamically adding widgets that are not present in the view) should be done here. '''passdefsetUIData(self,ui,request):''' Any data populating that occurs as a result of the data in the request should be done here. '''passdefprocessPost(self,ui,request):''' Any unique processing that needs to be done on a post should be done here. Note: There is corresponding process(Get|Delete|Put) methods. '''passdefvalidPost(self,ui,request):''' Any validation of post data should occur here: with true being returned only if the data is valid. Note: There is corresponding valid(Get|Delete|Put) methods. '''returnTrue
Modifying the Appearance of a WebBot App
WebBot is designed to make editing the appearance of your app as quick and DRY(Don't Repeat Yourself) as possible. Toward this goal WebBot comes with a base stylesheet, that defines good defaults for most HTML objects and WebElement widgets.
Once you have compasss installed on your system you can modify the Site.sass file located in [AppName]/static/sass/. After you have made the necessary modifications to your apps style definition run the following from [AppName]/static/: