python3.6 django 2.0 最新版本,终于能返回页面了,使用HttpResponseRedirect好使
def edit_action(request):
title = request.POST.get('title','TITLE')
context = request.POST.get('context','CONTEXT')
models.Article.objects.create(title=title , context=context)
return HttpResponseRedirect('/index2')
def edit_action(request):
title = request.POST.get('title','TITLE')
context = request.POST.get('context','CONTEXT')
models.Article.objects.create(title=title , context=context)
return HttpResponseRedirect('/index2')
2018-05-15
<form action="/blog/edit_action/ " method="post"> 这样写也没问题啊 哈哈哈
2018-05-14