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
index.html · 827 bytes · 32 lines
1{% extends "base.html" %}
2
3{% block title %}Home - Microblog{% endblock %}
4
5{% block nav %}
6<nav>
7 <a href="/">Home</a>
8 <a href="/profile/{{ user.username }}">Profile</a>
9 <a href="/logout">Logout</a>
10</nav>
11{% endblock %}
12
13{% block content %}
14<h2>Timeline</h2>
15<form method="POST" action="/post">
16 <textarea name="content" rows="3" placeholder="What's on your mind?" required></textarea>
17 <button type="submit">Post</button>
18</form>
19
20{% if posts %}
21 {% for post in posts %}
22 <div class="post">
23 <div class="post-meta">
24 <a href="/profile/{{ post.username }}">{{ post.username }}</a> · {{ post.created }}
25 </div>
26 <div>{{ post.content }}</div>
27 </div>
28 {% endfor %}
29{% else %}
30 <p>No posts yet. Follow some users or post something!</p>
31{% endif %}
32{% endblock %}