擅长:python、mysql、java
<p>从文件中-</p>
<blockquote>
<p><code>redirect(to[, permanent=False], *args, **kwargs)</code> Returns an
<code>HttpResponseRedirect</code> to the appropriate URL for the arguments passed.</p>
</blockquote>
<p>从定义上看是一样的。这就是捷径的作用。两者是同一的。</p>
<p>快捷方式通常写在实际API之上一级。因此<code>redirect</code>用arg <code>permanent=False</code>封装了<code>HttpResponseRedirect</code>和<code>HttpResponsePermanentRedirect</code>。</p>
<p>在<code>redirect</code>上使用<code>HttpResponseRedirect</code>没有大的缺点。希望这能解决问题。</p>