擅长:python、mysql、java
<p>保存对象后,可以<a href="https://docs.djangoproject.com/en/3.0/topics/http/shortcuts/#redirect" rel="nofollow noreferrer">redirect</a>如下所示:</p>
<pre><code> obj.user = request.user
obj.save()
return redirect('you_main_page_url')
</code></pre>
<p>保存对象后不要调用窗体</p>