Example DBBasic apps (an API, a blog and a microblog) and a template for new DBBasic modules.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-examples.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-examples.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-examples.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add official module template for creating DBBasic packages 17cf88a 1 year, 1 month ago History
api.py · 318 bytes · 9 lines
1from dbbasic.tsv import TSV
2from dbbasic_web.responses import html
3from dbbasic_web.templating import render
4
5def handle(request):
6 posts = TSV("posts", ["id", "title", "content", "author", "created"])
7 all_posts = list(posts.all())
8 all_posts.reverse()
9 return html(render('index.html', posts=all_posts))