Example #1
0
 def index(self, basket=None):
     #+ " collate nocase"
     baskets = Basket.select().order_by(fn.Lower(Basket.basketName))
     
     if (None == basket):
         theBasket = Basket.select().order_by(fn.Lower(Basket.basketName)).first()
     else:
         theBasket = Basket.get(Basket.id == basket)
         
     notes = theBasket.Notes
     for note in notes:
         note.header = note.getHeader()
         
     tmpl = lookup.get_template("container.html")
     RuntimeSettings.currentBasket = theBasket
     tags = RuntimeSettings.getTags()
     return tmpl.render(notes= notes, baskets=baskets, selectedBasket=theBasket, 
                        tagsList=tags, base = "file://" + NotesConfig.webDir + "/")