Beispiel #1
0
def add(req):
    username = req.session['username']
    uf = UserForm(req.GET)
    content = req.POST.get('content')
    title = req.POST.get('title')
    new = BLOG(username=username, title=title, content=content)
    new.save()
    return HttpResponseRedirect('/yunwei/blog')