Пример #1
0
def index():
	blog = blogs.all();
	form = BlogsForm();
	if request.method == 'POST':
		flag = form.validate(request.params)
		if flag:
			n = blogs(**form.data);
			n.username = request.user.username
			n.save();
	return {'blog':blog,'form':form}
Пример #2
0
def index():
    blog = blogs.all()
    return {'blog':blog}