Example #1
0
// get function
func (self *ManageAFloatsWaitress) Get(w http.ResponseWriter, r *http.Request, c appengine.Context) {
	// get all afloat
	aFloats, err := ds.GetAllAFloat(c)
	oops(err, w)
	// setup build cube
	buildCube := core.GetBuildCube(self.GetApp(), r)
	buildCube["PageCube"]["AFloats"] = aFloats

	sharedTempler.BuildPage(c, w, buildCube, "baseTpl", "manageAFsTpl")
	return
}
Example #2
0
// over write "Get" method
func (self *HomeWaitress) Get(w http.ResponseWriter, r *http.Request, c appengine.Context) {
	// get all articles
	articles, err := ds.GetAllArticles(c)
	oops(err, w)
	aFloats, err := ds.GetAllAFloat(c)
	oops(err, w)
	// setup
	buildCube := core.GetBuildCube(self.GetApp(), r)
	buildCube["PageCube"]["Articles"] = articles
	buildCube["PageCube"]["AFloats"] = aFloats
	// build page
	err = sharedTempler.BuildPage(c, w, buildCube, "baseTpl", "homeTpl")
	oops(err, w)
}